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

Improve handling of wrong tag ranges

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: 2.4.9
    • Fix Version/s: None
    • Component/s: Sharding
    • Labels:
      None

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: