[SERVER-38964] geo_distinct.js does not properly sort an array of documents before checking for an expected ordering Created: 11/Jan/19 Updated: 29/Oct/23 Resolved: 14/Jan/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying, Replication |
| Affects Version/s: | None |
| Fix Version/s: | 4.1.7 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Samyukta Lanka | Assignee: | Samyukta Lanka |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Operating System: | ALL | ||||
| Sprint: | Repl 2019-01-28 | ||||
| Participants: | |||||
| Linked BF Score: | 20 | ||||
| Description |
|
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. |
| Comments |
| Comment by Githook User [ 14/Jan/19 ] |
|
Author: {'username': 'lankas', 'email': 'samy.lanka@mongodb.com', 'name': 'Samy Lanka'}Message: |