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

DeleteStage will omit returning deleted document if WCE occurs when restoring its children

    • Type: Icon: Bug Bug
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 4.4.0, 5.0.0, 6.0.0, 7.0.0-rc0
    • Component/s: None
    • None
    • Query Execution
    • ALL
    • QE 2023-07-24

      DeleteStage handles WriteConflictExceptions/TemporarilyUnavailableExceptions when restoring its children state by returning NEED_YIELD. If the stage needs to return the deleted document, it annotates it on `_idReturning` so that on the next `doWork` it is returned. However, if the delete was "justOne: true", the next `doWork` will immediately return EOF instead of the pending document.

      If this happened, findAndModify would delete the document but not return it.

            Assignee:
            denis.grebennicov@mongodb.com Denis Grebennicov
            Reporter:
            jordi.serra-torrens@mongodb.com Jordi Serra Torrens
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: