Fix scanToNoHolesEOF() atomicity violation

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Storage Execution
    • ALL
    • Storage Execution 2026-07-06
    • 200
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      If we hit a WriteConflictException while scanning entries in scanToNoHolesEOF(), _pending is partially modified, but the lastBufferedRid does not advance in the oplog tailer. When the tailer tries to scan the oplog the next time, the cursor is positioned back at lastBufferedRid, and we double count those partially applied entries.

      scanToNoHolesEOF() must be atomic; either the scan completes and the lastBufferedRid is advanced, or the scan fails, _pending does not contain entries from the failed scan, and lastBufferedRid does not advance.

            Assignee:
            Cedric Sirianni
            Reporter:
            Cedric Sirianni
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: