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.
- related to
-
SERVER-14302 Equality queries on _id with projection may return no results on sharded collections
- Closed