我使用Azure Elastic Scale Split Merge工具将一个shardlet移动到另一个shard。一切似乎按计划进行,但最终却没有告诉我原因。
这是日志的完整输出
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]
有没有办法要求更详细的信息,以便我知道它出错的原因?
答案 0 :(得分:0)
在数据库中,拆分合并服务使用元数据,您有一个名为RequestStatus的表。
如果你这样做
select details from requeststatus where operationid = '4ca7910b-ce66-45fd-a450-c95765c590d6'
你会得到一个xml报告,其中包含由于某种原因而不会总是显示web-ui的错误。
答案 1 :(得分:0)
我在设置分片时通过设置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);
}
不确定它是否是正确的方法,但它有效