Improved warning for low cardinality keys

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Major - P3
    • 3.1.4
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • Fully Compatible
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

              Assignee:
              David Hows (Inactive)
              Reporter:
              Charlie Page (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: