Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-9371

addTagRange should prevent min and max being the same

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 2.2.4, 2.4.1
    • 2.5.3
    • Sharding
    • Fully Compatible

    Description

      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).

      Attachments

        Issue Links

          Activity

            People

              randolph@mongodb.com Randolph Tan
              asya.kamsky@mongodb.com Asya Kamsky
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: