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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 3.6.5, 3.7.4
    • Replication, Storage
    • None
    • Fully Compatible
    • ALL
    • v3.6
    • 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

              william.schultz@mongodb.com William Schultz (Inactive)
              william.schultz@mongodb.com William Schultz (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: