Details
-
Improvement
-
Status: Open
-
Minor - P4
-
Resolution: Unresolved
-
3.4.18, 4.0.3
-
None
-
Sharding EMEA
-
(copied to CRM)
Description
I have attached a reproduction of a 3.4 sharded cluster moving from 2 to three shards with ranges in place.
This has a compound shard key:
sh.shardCollection("trev.historicTrackingEvent", {platformVehicleIdentifier: 1, triggerTime: 1})
|
This works:
sh.addTagRange("trev.historicTrackingEvent",
|
{ platformVehicleIdentifier: MinKey},
|
{ platformVehicleIdentifier: "8" },
|
"A" // Zone A
|
);
|
and defaults triggerTime to MinKey
However,
sh.removeTagRange("trev.historicTrackingEvent",
|
{ platformVehicleIdentifier: MinKey},
|
{ platformVehicleIdentifier: "8" },
|
"A"
|
);
|
gives
{ok:1}but leaves the config in config.tags.
It needs to be changed to the following with explicit triggerTime values:
sh.removeTagRange("trev.historicTrackingEvent",
|
{ platformVehicleIdentifier: MinKey, triggerTime: MinKey},
|
{ platformVehicleIdentifier: "8" , triggerTime: MinKey},
|
"A" // Zone A
|
);
|
This was quite confusing and hard to troubleshoot. Perhaps sh.removeTagRange should return ok:0 when no tags match, and/or include a message? And/or use the same logic as in sh.addTagRange to default the second field to MinKey?