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

Resuming a change stream with a resume token for an event that no longer matches returns an error

    • Type: Icon: New Feature New Feature
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Query Execution

      If you open a change stream with a match expression and observe a resume token, then make the match expression more selective and open the stream again there is a possibility that the event no longer matches and you get an error for the resume token no longer being in the oplog. 

       

      This seems reasonable, but when we factor in that the FullDocument field can be variable, then this becomes a bit more problematic as the following can happen: 

      1. Trigger processes event a on document that matches the match expression
      2. Trigger stops
      3. Document is updated to no longer match the trigger 
      4. Trigger restarts and resumes but no longer finds that event because the fullDocument no longer matches the match expression  

       

      Bernard told me to file a SERVER ticket for this epic for this

       

        1. watcher.js
          0.6 kB
        2. writer.js
          0.2 kB
        3. writer2.js
          0.2 kB

            Assignee:
            backlog-query-execution [DO NOT USE] Backlog - Query Execution
            Reporter:
            tyler.kaye@mongodb.com Tyler Kaye
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: