我在为我们的系统创建新分片时遇到了麻烦。我有一个已经分片的数据库,有两个分片。
0-280000
280000-inf
我正在使用this Microsoft 提供的应用程序。
使用上面的应用程序,我选择添加分片,当我尝试添加新分片并输入 400000 作为新的高键时,执行操作,最后当它尝试添加范围映射时,我得到以下信息错误。
错误
{"Mapping referencing shard '[DataSource=xxxxxxxxxxxxxx Database=xxxxxx]' in the shard map 'UserID' cannot be added because the Range it covers is already mapped by another mapping. Error occurred while executing stored procedure '__ShardManagement.spBulkOperationShardMappingsGlobalBegin' for operation 'AddRangeMapping'. This can occur if another concurrent user has already added a mapping covering the given Range."}
我们将非常感谢您在这方面的任何帮助。
最佳答案
如果您的第二个分片实际上是 280000-inf,其中 inf 表示无穷大,那么您收到的错误是正确的。第二个分片已包含 400000 个映射。您不需要添加分片,而是需要拆分第二个分片。查看split-merge工具代替。
关于azure - 添加新分片 - Azure Elastics Scale,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33169337/