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

CollectionMetadata::keyBelongsToMe() should assert that given key is non-empty in debug builds

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major - P3
    • Resolution: Won't Fix
    • None
    • None
    • Sharding

    Description

      mongos enforces that documents modified in or inserted into sharded collections must have non-empty values for the shard key (though this is not enforced if mongos is bypassed). CollectionMetadata::keyBelongsToMe() could have a debug-only assert that fails the operation or terminates the process if a document is encountered that is missing the shard key.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rassi J Rassi
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: