You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
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.
The text was updated successfully, but these errors were encountered: