1

I'm using the Azure Elastic Scale Split Merge tool to move one shardlet to another shard. Everything seems to go as planned but in the end it fails without telling me why.

This is the complete output of the log

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]

Is there a way to ask for more detailed info so I can know why it goes wrong?

Arn Vanhoutte
  • 1,779
  • 4
  • 16
  • 28
  • I have the exact same thing happening, have you figured out anything? I suspect it is due to a circular relationship in the db, but for another circular fk I get a proper error message – Eivind T Aug 02 '16 at 07:09
  • Sorry for the late answer. I managed to fix it by setting the SchemaInfo in code when I initialize the database – Arn Vanhoutte Aug 03 '16 at 13:17

2 Answers2

0

In the database the split-merge service uses for metadata you have a table called RequestStatus.

If you do select details from requeststatus where operationid = '4ca7910b-ce66-45fd-a450-c95765c590d6' you will get a xml report with the error that occured that the web-ui for some reason not always will show.

Eivind T
  • 1,059
  • 9
  • 14
0

I managed to fix it by setting my SchemaInfo when I set up my shards:

        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);
        }

Not sure if it is the right way, but it works

Arn Vanhoutte
  • 1,779
  • 4
  • 16
  • 28