I didn’t realize that my containerKey was string ‘9999999’ not 9999999, I cut and pasted your post. Now I am ending up with
tags: [
{
tag: 'West',
min: { containerKey: 8000000, eventId: MinKey() },
max: { containerKey: 9000000, eventId: MinKey() }
},
{
tag: 'East',
min: { containerKey: 9000000, eventId: MinKey() },
max: { containerKey: 10000000, eventId: MinKey() }
},
{
tag: 'Ohio',
min: { containerKey: 10000000, eventId: MinKey() },
max: { containerKey: 11000000, eventId: MinKey() }
}
]
And can't merge the two West tags
sh.updateZoneKeyRange("METRIC_RAW_DATA.OPERATIONAL_METRIC",{ containerKey: '8000000' }, {containerKey: '9000000' },null)
{
ok: 1,
'$clusterTime': {
clusterTime: Timestamp({ t: 1748897099, i: 1 }),
signature: {
hash: Binary.createFromBase64('KEAbKzpJMTiPhFaVOGEyYROs4Ys=', 0),
keyId: Long('7469301375919194116')
}
},
operationTime: Timestamp({ t: 1748897099, i: 1 })
}
sh.updateZoneKeyRange("METRIC_RAW_DATA.OPERATIONAL_METRIC",{ containerKey: '8000000', _id: MinKey() }, {containerKey: '9999999', _id: MinKey() },"West")
MongoServerError[RangeOverlapConflict]: Zone range: { containerKey: "8000000", _id: MinKey } -->> { containerKey: "9999999", _id: MinKey } on West is overlapping with existing: { containerKey: "8000000", _id: MinKey } -->> { containerKey: "9000000", _id: MinKey } on West
Even though the first 'null' command shows "ok", when I check the sh.status() after the command was executed, the tag is still there and I can't remove it.
{
tag: 'West',
min: { containerKey: '8000000' },
max: { containerKey: '9000000' }
}