Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-57792

Always supply invalidate event to DSCSEnsureResumeTokenPresent when starting after an invalidate

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • Query Execution 2021-06-28, Query Execution 2021-07-12, Query Execution 2021-07-26

      With change stream optimization enabled, if we push down a $match that filters out an invalidate message from the stream, we still ensure that the stream is invalidated via our new ChangeStreamInvalidation exception. But we also provide the invalidate resume token as the final PBRT to the client, so they can optionally use it with startAfter to restart the stream after the invalidation. But in this case, even if they restart the stream with the exact same pipeline, DSCSEnsureResumeTokenPresent will fail to see the token in the resumed stream and will throw.

      We should make sure that we support resuming in all cases where the resume pipeline is identical to the original pipeline, including the case of startAfter with an invalidate token.

            Assignee:
            denis.grebennicov@mongodb.com Denis Grebennicov
            Reporter:
            bernard.gorman@mongodb.com Bernard Gorman
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: