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

Improved warning for low cardinality keys

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.1.4
    • Component/s: Sharding
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible

      Description

      mongo estimates the "max" reasonable chunk size and warns if that chunk size exceeds that, in a effort to detect low cardinality keys. The error message is:

      Sat May 17 16:10:09.335 [conn164120] warning: chunk is larger than 1024 bytes because of key { field1: "value1", field2: value2 }
      

      A more informative error message like: "warning possible low cardinality for shard key detected <database>.<collection>" would be helpful.

        Attachments

          Activity

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: