Azure / Azure/elastic-db-tools
RecoveryManager.DetachShard(ShardLocation, string) always removes the shard from all shard maps
- Dominant language
- C#
- Stars
- 147
- Forks
- 108
- PR merge metrics
- No merged PRs in 30d
Description
The RecoveryManager.DetachShard(ShardLocation, string) method is meant to remove the specified shard and its mappings from only a specific shard map, unless if the specified shard map name is null, in which case the shard and its mappings will be removed from all shard maps.
However there is an bug in the internal parameter passing that causes the shard map name parameter to always be considered null, even when it actually is specified. This means that the shard and its mappings are always removed from all shard maps.
The problem is that the library serializes the parameter as `ShardMap`[1] but it is deserialized in the stored proc as `Shardmap`[2].
[1] https://github.com/Azure/elastic-db-tools/blob/v1.2.0/Src/ElasticScale.Client/ShardManagement/StoreOperations/Base/StoreOperationRequestBuilder.cs#l779
[2] https://github.com/Azure/elastic-db-tools/blob/v1.2.0/Src/ElasticScale.Client/ShardManagement/Scripts/CreateShardMapManagerGlobal.sql#l2938
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.