Currently there are extensive checks to make sure that tag ranges don't overlap but it's allowable to set tagrange to have the same min and max.
In the code this seems to result in matching nothing.
This means that people who try to create a tag range to cover a single value of the shard key cannot do it via
{min: VALUE, max: VALUE}as that will match nothing.
If it's supposed to match VALUE then code needs to be changed, if the range should be
{ min: VALUE, max: <VALUE+1> }(logical next possible value) then the sh.addTagRange() function should reject min==max and maybe docs should call out this case.
(in compound shard keys this is easy because you then use VALUE,$minKey to VALUE,$maxKey, this seems to be the problem with simple shard keys).
- depends on
-
SERVER-11044 Expose BSONObj::wocompare to mongo shell
- Closed
- is related to
-
SERVER-6357 Add tag based sharding commands
- Closed