[SERVER-58421] Always supply resume event to DSCSEnsureResumeTokenPresent Created: 12/Jul/21  Updated: 12/Jul/21  Resolved: 12/Jul/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Bernard Gorman Assignee: Rishab Joshi (Inactive)
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Sprint: Query Execution 2021-07-26
Participants:

 Description   

One consequence of the $match pushdown work in SERVER-56871 is that resume tokens may be filtered out if the pipeline used to resume the stream is more restrictive than the original stream. We are OK with this, because resume tokens are not really intended to be applicable to streams other than the one that generated them. However, we found an edge case where startAfter with an invalidation token could render the stream unresumable even with the same pipeline as the original stream, and addressed this in SERVER-57792.

Since it is not desirable to have a special-case for this scenario, and since the invalidate stage should ideally have minimal exposure to resume semantics, we should generalize the work done under SERVER-57792 to apply to all resume tokens.



 Comments   
Comment by Bernard Gorman [ 12/Jul/21 ]

After some consideration, we realised that this would produce inconsistent behaviour whereby a resume pipeline containing a $match filter that excludes the resume event might or might not inhibit the resumption of the stream, depending on whether we can rewrite that filter into the oplog. We believe that the semantics will be much more clear if a resume token unambiguously cannot be used to resume a stream with a pipeline which excludes that event. The startAfter case is genuinely distinct from the general case, since we are technically starting a new stream on a collection which has been recreated, possibly with a different schema.

Generated at Thu Feb 08 05:44:28 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.