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

Oplog visibility rules can cause cappedTruncateAfter to erroneously skip record deletion in WiredTiger

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.6.5, 3.7.4
    • Component/s: Replication, Storage
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v3.6
    • Linked BF Score:
      0

      Description

      The WiredTigerRecordStore::cappedTruncateAfter method truncates a capped collection after a given RecordId. For a non-inclusive truncation, it first establishes a forward scanning cursor on the collection and then iterates forward to the record immediately succeeding the given truncation point. If no next record is found it will return and not execute the capped truncation. This can be a problem when truncating the oplog collection, since the forward scanning record store cursor will be bound to oplog visibility rules, and if the oplog read timestamp has not been updated yet to the newest timestamp, this cursor may erroneously be exhausted before reaching the end of the oplog, making it seem like the oplog has less entries than it actually does. This can cause the oplog to not properly be truncated after a call to cappedTruncateAfter.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              william.schultz William Schultz
              Reporter:
              william.schultz William Schultz
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: