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

Improve handling of wrong tag ranges

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.4.9
    • Component/s: Sharding
    • None

      A customer defined tag ranges for a collection but used the wrong shard key in sh.addTagRange(). The collection was sharded on (files_id:1,n:1) but the tag ranges defined for _id. (This was a GridFS fs.chunks collection.)

      The sh.addTagRange() command worked without error, but the balancer failed as soon as it got to the offending definition (you could see that in the log files). As a result, none of the collections were properly balanced (because it failed before it started doing anything).

      I see two desirable improvements:

      • The sh.addTagRange() command should fail if the shard key definition does not match.
      • In the event of a wrong setting for one collection, the balancer should still balance any other collections, rather than failing completely.

            Assignee:
            Unassigned Unassigned
            Reporter:
            andre.spiegel@mongodb.com Andre Spiegel
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: