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

Fix wall time correctness bug in CollectionTruncateMarkers

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Works as Designed
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None
    • ALL
    • Execution Team 2023-03-06, Execution Team 2023-03-20

    Description

      With the creation of CollectionTruncateMarkers we discovered that there is a correctness bug in the previous OplogStones class with regards to the retention time.

      In a given marker right now the wallTime and record id assigned are the ones of the latest record inserted. This presumes that the following constraints hold given records A and B with ids idA, idB, and wall times wallA, wallB:

      • idA < idB
      • wallA <= wallB

      There might be the case though that the following case occurs sometimes in entries:

      • idA < idB
      • wallA >= wallB

      In this case, time-based expiration systems would eagerly delete something before it's supposed expiration time. To fix this we should ideally replace the simple marker creation with something that keeps track of the highest wallTime seen between markers. This would help prevent the correctness issue for time-based expiration systems by guaranteeing that all items present in a marker are older than the given wall time.

      Attachments

        Activity

          People

            jordi.olivares-provencio@mongodb.com Jordi Olivares Provencio
            jordi.olivares-provencio@mongodb.com Jordi Olivares Provencio
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: