-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Querying, Replication
-
None
-
Fully Compatible
-
ALL
-
Repl 2019-01-28
-
20
If the primary steps down after inserts have been made in geo_distinct.js, then the new primary is not guaranteed to have inserted them in the same order. This manifested when all of these inserts were part of the same transaction (and therefore the same applyOps oplog entry). The test then fails a check of the returned documents because they are in the wrong order and the sort function used does not actually sort the documents.
Instead, we should properly sort the returned documents using bsonWoCompare.