The test checks that a collMod that adds a unique constraint fails because there are duplicated keys, and also that that the command returns the id of the offending documents. It also tests that the command behaves well when the size of the id's is too great (over 8MB), in which case the command will only return documents up to the 8MB limit. However, it assumes that the command will not return the last inserted document. This assumption is incorrect, in particular, if the balancer moves documents between shards, because the id list is returned in RecordId order, and that order can change whenever a migration takes place. The test should check, instead, that the returned set of documents is among the inserted documents, and that less than 8 are returned.
- Votes:
-
0 Vote for this issue
- Watchers:
-
1 Start watching this issue
- Created:
- Updated:
- Resolved: