Fix oldest_ts being older than the newest_start_durable_ts during export/import

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.2.0-rc0, 8.1.3, 8.0.13
    • Affects Version/s: None
    • Component/s: None
    • None
    • Storage Engines, Storage Engines - Server Integration
    • Fully Compatible
    • ALL
    • v8.1, v8.0
    • SESI - 2025-06-24
    • 200
    • None
    • 3
    • TBD
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      We root-caused the linked BF and identified a bug that could occur in the import/export collection flow. As part of the rollback correctness requirements, when we import a collection the newest_start_durable_ts must be older than the oldest_ts. When we are restarting the mongod, the oldest timestamp gets reset to the current time (via _lastCommittedOpTimeAndWallTime) which in the event that the machine is really fast and we have started the mongod within the same second, the timestamp assigned to oldest_ts could end up being the same second as the newest_start_durable_ts. Since we are in a new mongod, the opcounter would be 1 for the newly set oldest_ts, and this would always be older than that of the newest_start_durable_ts and hence our invariant would fail.

      See example below:

      newest start durable ts - (1749183999, 18)
      oldest_ts - (1749183999, 1)

      This ticket will address this by adding a three second sleep after we have exported the collection in the replsettest helper file.

              Assignee:
              Clarisse Cheah
              Reporter:
              Clarisse Cheah
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: