Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DetectMappingDifferences - The length of raw value specified for the shard key does not match the expected length #204

Open
nicksolsen opened this issue Feb 24, 2020 · 0 comments

Comments

@nicksolsen
Copy link

We have a shard map using long (Int64) as the shard key and in the event of a failover we do a DetachShard and AttachShard operation which works fine but then when we call RecoveryManager.DetectMappingDifferences it fails with the following exception:

System.ArgumentOutOfRangeException: 'The length of raw value specified for the shard key (4 bytes) does not match the expected length (8 bytes) for the ShardKeyType (Int64) specified.
Parameter name: rawValue
Actual value was System.Byte[].'

This is actually failing when iterating through lsmMappings.StoreMappings and the attempted creation of the ShardKey. The call to ShardKey.FromRawValue is failing because the lsmMapping.MinValue is being populated with a byte array of length 4 instead of 8.

I'm not sure what to do here as we have no control over the population of lsmMappings and its not coming back populated with the correct type of array.

@nicksolsen nicksolsen changed the title DetectMappingDifferences - The length of raw value specified for the shard key does not match the expected legnth DetectMappingDifferences - The length of raw value specified for the shard key does not match the expected length Feb 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant