[SERVER-63781] $sortKey not filtered out in initial batch from post batch resume token Created: 17/Feb/22 Updated: 29/Oct/23 Resolved: 04/Mar/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.0.0-rc0, 4.4.18, 4.2.24, 5.0.13 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Jennifer Peshansky (Inactive) | Assignee: | Mickey Winters |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | pm-2419-commit | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||||||||||
| Sprint: | QE 2022-03-07 | ||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||
| Description |
|
Failing test: shell_helper.js Error: results != expected Symptoms: sortKey not removed
|
| Comments |
| Comment by Githook User [ 08/Nov/22 ] |
|
Author: {'name': 'Mickey. J Winters', 'email': 'mickey.winters@mongodb.com', 'username': 'mjrb'}Message:
both modified: src/mongo/s/query/cluster_aggregate.cpp (cherry-picked from commit e424f3ed1266bcd772c52bcf23c518b2fe6c83ab) |
| Comment by Githook User [ 31/Oct/22 ] |
|
Author: {'name': 'Mickey. J Winters', 'email': 'mickey.winters@mongodb.com', 'username': 'mjrb'}Message:
(cherry-picked from commit 4d5451b20fecaf4a054cca94de6962fcf28c577f) |
| Comment by Githook User [ 07/Sep/22 ] |
|
Author: {'name': 'Mickey. J Winters', 'email': 'mickey.winters@mongodb.com', 'username': 'mjrb'}Message:
(cherry-picked from commit fc54ebd0137a25ea664c022b51b685667dd037c7) |
| Comment by Githook User [ 03/Mar/22 ] |
|
Author: {'name': 'Mickey. J Winters', 'email': 'mickey.winters@mongodb.com', 'username': 'mjrb'}Message: |
| Comment by Jennifer Peshansky (Inactive) [ 28/Feb/22 ] |
|
We need to override the initial batch size to be 0 in the initial aggregate command for a per shard cursor. This will establish the cursors. We can establish machinery using those cursors on the mongos side, and use that to get results. It will require another getMore to the shards. If this is an initial find with a tailable awaitData cursor, we return. |
| Comment by Mickey Winters [ 25/Feb/22 ] |
|
the fix for this seems to just be only establishing the cursor when the initial aggregate command is sent so that there is no first batch. sharded change streams seems to have this behavior where if you have startAfter and there are events to be returned you have to call getMore to actually get them |
| Comment by Mickey Winters [ 25/Feb/22 ] |
|
in shell_helpers.js only 1 event is returned and no getMore is issued. so the events with the $sortKey unfiltered seems to be returned with the first initial batch. this explains why for some of the failures when there is more than one change only the first change seems to have the unfiltered sort key |