$out on secondary node can produce incorrect results if primary steps down

XMLWordPrintableJSON

    • Query Execution
    • Fully Compatible
    • ALL
    • v8.0, v7.0, v6.0
    • QE 2025-01-20, QE 2025-02-03, QE 2025-02-17
    • 200
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      1. $out starts on a secondary. It creates a `temp` collection and starts writing to it.
      2. Election happens and a new primary steps up. On stepup `temp` collections are dropped.
      3. $out on the secondary continues running and will start targeting upcoming inserts to the new primary.
      4. Since the `temp` collection has been dropped on step (2), the write at (3) will implicitly recreate it.
      5. $out finishes successfully, but documents written before step (2) are missing.

              Assignee:
              Kristina Znam
              Reporter:
              Jordi Serra Torrens
              Votes:
              0 Vote for this issue
              Watchers:
              14 Start watching this issue

                Created:
                Updated:
                Resolved: