0

I am configuring a test mongo setup with 2 shards, and I'm trying to add zone ranges to each shard:

sh.updateZoneKeyRange('mydb.test', {id:MinKey,ts:MinKey}, {id:MaxKey,ts:1548787704000}, 'cold')

sh.updateZoneKeyRange('mydb.test', {id:MinKey,ts:1548787704000}, {id:MaxKey,ts:MaxKey}, 'hot')

First command runs fine, but second tells me:

Zone range: { id: MinKey, ts: 1548787704000.0 } -->> { id: MaxKey, ts: MaxKey } on hot is overlapping with existing: { id: MinKey, ts: MinKey } -->> { id: MaxKey, ts: 1548787704000.0 } on cold

I thought the maximum bounds were exclusive and minimum bounds inclusive?

3
  • Duplicate of stackoverflow.com/questions/59973944/… Jan 29, 2020 at 19:59
  • @WernfriedDomscheit your comment will probably discourage people from responding as they might think it was already answered somewhere else. Might be more useful to mark it as duplicate after someone answers as then people searching on either community can find what they're looking for.
    – Thiatt
    Jan 29, 2020 at 20:35
  • You can mark a question as duplicated only within one site (i.e. dba.stackexchange.com). People will click the link and answer one of them. Jan 29, 2020 at 21:26

2 Answers 2

0

From what I can gather after some experiments, it seems that the prefix range is the one that must be split.

0

You can check the config database. Maybe the docs in [tags] collection still have old setting. I use mongoDB 4.4.11 and sometimes the tag setting will not be deleted even if I drop the database, and need to delete them manaually.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.