Инструмент Elastic Scale Split/Merge неожиданно завершает работу
Я использую инструмент разделения слияния эластичных масштабов Azure для перемещения одного осколка в другой. Кажется, все идет по плану, но, в конце концов, не получается, не объясняя, почему.
Это полный вывод журнала
Status: Failed
Details: [Error] The request failed.
Status: Completing
Details: [Informational] Deleting any temp tables that were created while processing the request.
Status: CopyingShardedTables
Details: [Informational] Successfully copied key range [8643e580-b986-426f-8a11-0d33bd766a37:8743e580-b986-426f-8a11-0d33bd766a37) for sharded table [Edumatic].[Channels].
Status: CopyingShardedTables
Details: [Informational] Moving key range [8643e580-b986-426f-8a11-0d33bd766a37:8743e580-b986-426f-8a11-0d33bd766a37) of sharded tables.
Status: CopyingReferenceTables
Details: [Informational] Successfully copied reference table [Edumatic].[RoleUsers].
Status: CopyingReferenceTables
Details: [Informational] Successfully copied reference table [Edumatic].[Roles].
Status: CopyingReferenceTables
Details: [Informational] Successfully copied reference table [Edumatic].[Quizes].
Status: CopyingReferenceTables
Details: [Informational] Successfully copied reference table [Edumatic].[Practices].
Status: CopyingReferenceTables
Details: [Informational] Successfully copied reference table [Edumatic].[Polls].
Status: CopyingReferenceTables
Details: [Informational] Successfully copied reference table [Edumatic].[Migrations].
Status: CopyingReferenceTables
Details: [Informational] Successfully copied reference table [Edumatic].[MediaNodes].
Status: CopyingReferenceTables
Details: [Informational] Successfully copied reference table [Edumatic].[Lectures].
Status: CopyingReferenceTables
Details: [Informational] Successfully copied reference table [Edumatic].[Items].
Status: CopyingReferenceTables
Details: [Informational] Successfully copied reference table [Edumatic].[GroupUsers].
Status: CopyingReferenceTables
Details: [Informational] Successfully copied reference table [Edumatic].[Groups].
Status: CopyingReferenceTables
Details: [Informational] Successfully copied reference table [Edumatic].[Exams].
Status: CopyingReferenceTables
Details: [Informational] Successfully copied reference table [Edumatic].[Activities].
Status: CopyingReferenceTables
Details: [Informational] Successfully copied reference table [Edumatic].[TreeStructures].
Status: CopyingReferenceTables
Details: [Informational] Successfully copied reference table [Edumatic].[TreeNodes].
Status: CopyingReferenceTables
Details: [Informational] Successfully copied reference table [Edumatic].[Workspaces].
Status: CopyingReferenceTables
Details: [Informational] Successfully copied reference table [Edumatic].[Locks].
Status: CopyingReferenceTables
Details: [Informational] Successfully copied reference table [Edumatic].[Media].
Status: Starting
Details: [Informational] Performing data consistency checks on target shards.
Status: Starting
Details: [Informational] Starting Split-Merge state machine for request.
Status: Queued
Details: [Informational] Operation has been queued.
Split-Merge request created with OperationId: [4ca7910b-ce66-45fd-a450-c95765c590d6]
Есть ли способ попросить более подробную информацию, чтобы я мог знать, почему это идет не так?
2 ответа
Мне удалось это исправить, установив SchemaInfo, когда я настраивал свои шарды:
SchemaInfoCollection schemaInfoCollection = this.ShardMapManager.GetSchemaInfoCollection();
SchemaInfo schemaInfo = new SchemaInfo();
schemaInfo.Add(new ReferenceTableInfo("dbo", "ActivityData"));
schemaInfo.Add(new ShardedTableInfo("dbo", "Answers", "ChannelId"));
schemaInfo.Add(new ShardedTableInfo("dbo","Channels","Id"));
schemaInfo.Add(new ReferenceTableInfo("dbo", "ExamData"));
schemaInfo.Add(new ShardedTableInfo("dbo","Groups", "ChannelId"))
bool keyExists = false;
foreach (var pair in schemaInfoCollection)
{
if (pair.Key == "ElasticScaleWithEF")
{
keyExists = true;
schemaInfoCollection.Replace("ElasticScaleWithEF", schemaInfo);
}
}
if (!keyExists)
{
schemaInfoCollection.Add("ElasticScaleWithEF", schemaInfo);
}
Не уверен, что это правильный путь, но это работает
В базе данных служба раздельного слияния использует для метаданных вашу таблицу с именем RequestStatus.
Если вы делаете select details from requeststatus where operationid = '4ca7910b-ce66-45fd-a450-c95765c590d6'
Вы получите xml отчет с ошибкой, которая по какой-то причине не всегда будет отображаться через веб-интерфейс.