Yielding in filemd5 doesn't abandon the snapshot

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing
    • Fully Compatible
    • ALL
    • v8.2
    • CAR Team 2025-08-04
    • 200
    • None
    • 3
    • TBD
    • 🟦 Shard Catalog
    • None
    • None
    • None
    • None
    • None
    • None

      As part of SERVER-105921Ā  we introduced acquisitions from the shard role API for the filemd5 command.
      The command is a just a collection scan that attempts to compute an hash. Since the operation is long, an interruption might cause the scan to be temporarily interrupted and the hash to be computed on document scanned so far.
      Since md5 computation can be slow, locks needs to beĀ yieldedĀ andĀ restored Ā in between the computation.
      However, in case of stepdown:

      • The yield might happen on the node as primary
      • the restore might happen on the node as secondary

      That causes the restore to change theĀ read sourceĀ which must beĀ kLastApplied, but thatĀ can't be changedĀ if a snapshot is still open (on wiredtiger)

      Solution are either

      • Abandon the snapshot before restoring (simple fix)
      • Think hard if this could be generalized by the restore functionality so that we don't have to let the caller deal with thisĀ 

              Assignee:
              Enrico Golfieri
              Reporter:
              Enrico Golfieri
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: