Marker OpTime indicating optime list was truncated must be fast to retrieve

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.1.0-rc0, 8.0.0-rc1
    • Affects Version/s: None
    • Component/s: None
    • None
    • Replication
    • Fully Compatible
    • ALL
    • v8.0
    • Repl 2024-04-15
    • 133
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The downgrade code for replicateVectoredInsertsTransactionally currently uses a marker OpTime value of "OpTime::max()" to indicate the oplog chain for a transaction table has been truncated. OpTimes with a timestamp with either component (seconds or inc) with the high bit set result in a full collection scan when searched for, resulting in poor performance with a long oplog.

      We can just make this marker optime {{1,0),-1} instead; this will never exist in the oplog because we never write optimes with an inc value of 0.

              Assignee:
              Matthew Russotto
              Reporter:
              Matthew Russotto
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: