[SERVER-40094] Do not prematurely reject resume attempt in DSShardCheckResumability Created: 12/Mar/19  Updated: 29/Oct/23  Resolved: 19/Mar/19

Status: Closed
Project: Core Server
Component/s: Aggregation Framework
Affects Version/s: None
Fix Version/s: 4.0.7, 4.1.10

Type: Bug Priority: Major - P3
Reporter: Bernard Gorman Assignee: Bernard Gorman
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
is depended on by SERVER-39678 Comprehensive test for resuming a Cha... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.0
Sprint: Query 2019-03-25
Participants:
Linked BF Score: 50

 Description   

In SERVER-38413, we changed DSShardCheckResumability such that it consumes any events at the same clusterTime as the specified resume token but which sort before it. To do so, it calls the compareAgainstClientResumeToken that was previously only called by the DSEnsureResumeTokenPresent stage.

However, the applyOpsIndex logic in compareAgainstClientResumeToken still operates on the assumption that it is only called from DSEnsureResumeTokenPresent. As a result, in cases where a resume token of clusterTime T is sent to a shard whose oplog entry at time T is a multi-document transaction, the shard may incorrectly uassert on this line when it observes that the local event's applyOpsIndex is greater than the resume token's. We may also return an inaccurate result on this line if we are on a merging shard and we observe an event with the same clusterTime as the resume token but a different UUID.



 Comments   
Comment by Githook User [ 25/Mar/19 ]

Author:

{'name': 'Bernard Gorman', 'username': 'gormanb', 'email': 'bernard.gorman@gmail.com'}

Message: SERVER-40094 Do not run change stream tests on ephemeralForTest variant
Branch: v4.0
https://github.com/mongodb/mongo/commit/acad4974972d98a0582fbbe59e464b40ddc9c017

Comment by Githook User [ 20/Mar/19 ]

Author:

{'name': 'Bernard Gorman', 'username': 'gormanb', 'email': 'bernard.gorman@gmail.com'}

Message: SERVER-40094 Do not prematurely reject resume attempt in DSShardCheckResumability

(cherry picked from commit 4fb1c39e803ea1876ac330b80e2ec5a443b29d33)
Branch: v4.0
https://github.com/mongodb/mongo/commit/1b82c812a9c0bbf6dc79d5400de9ea99e6ffa025

Comment by Githook User [ 19/Mar/19 ]

Author:

{'name': 'Bernard Gorman', 'username': 'gormanb', 'email': 'bernard.gorman@gmail.com'}

Message: SERVER-40094 Do not prematurely reject resume attempt in DSShardCheckResumability
Branch: master
https://github.com/mongodb/mongo/commit/4fb1c39e803ea1876ac330b80e2ec5a443b29d33

Generated at Thu Feb 08 04:54:00 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.