[SERVER-73009] Decreasing order sort on clustered collections on replica sets returns increasing order Created: 18/Jan/23 Updated: 29/Oct/23 Resolved: 02/Feb/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.3.0-rc0, 6.0.5 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Rohan Sharan | Assignee: | Alyssa Clark |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Assigned Teams: |
Query Execution
|
||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||
| Backport Requested: |
v6.2, v6.0
|
||||||||||||||||||||
| Sprint: | QE 2023-02-06 | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Description |
|
There was replica set passthrough tests that were failing on mongosync for clustered collections so they had previously been disabled. In trying to re-enable them (REP-1479), I found that there seems to be an issue with sorting and clustered collections on replica sets on v6.0. The example I am about to add is with a clustered collection with collation, but I think the issue is present on other types of clustered collections as well.
As we can see, when it tries to sort the documents in a clustered collection in decreasing order, it still sorts them in increasing order. |
| Comments |
| Comment by Githook User [ 02/Feb/23 ] | ||||||||||||||||||||||||||||||||||
|
Author: {'name': 'Alyssa Wagenmaker', 'email': 'alyssa.wagenmaker@mongodb.com', 'username': 'awagenmaker'}Message: | ||||||||||||||||||||||||||||||||||
| Comment by Githook User [ 02/Feb/23 ] | ||||||||||||||||||||||||||||||||||
|
Author: {'name': 'Alyssa Wagenmaker', 'email': 'alyssa.wagenmaker@mongodb.com', 'username': 'awagenmaker'}Message: | ||||||||||||||||||||||||||||||||||
| Comment by Rohan Sharan [ 26/Jan/23 ] | ||||||||||||||||||||||||||||||||||
|
We have a mongosync release coming up in the next few weeks, so it would be great if this could be fixed by then. We currently are supposed to be supporting clustered collections in mongosync (without expireAfterSeconds), but we will get data consistency errors with replica sets unless this is fixed. If it can't be fixed, we may have to add it as a limitation. cc tim.fogarty@mongodb.com | ||||||||||||||||||||||||||||||||||
| Comment by Rohan Sharan [ 20/Jan/23 ] | ||||||||||||||||||||||||||||||||||
|
louis.williams@mongodb.com I'm not too familiar with the server's process on when they fix issues like this. Is this going to be patched any time soon? | ||||||||||||||||||||||||||||||||||
| Comment by Louis Williams [ 19/Jan/23 ] | ||||||||||||||||||||||||||||||||||
|
The problem appears to be that the hint overrides the sort order:
When explained, the descending sort correctly uses a backward collection scan and does not use a blocking sort:
|