ExportXMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 9.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Storage Execution
    • Fully Compatible
    • ALL
    • Storage Execution 2026-11-09, Storage Execution 2026-11-23
    • 200
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Classic oplog application has the following locks to prevent fsync and validate from running mid batch:

              // Don't allow the fsync+lock thread to see intermediate states of batch application.
              std::lock_guard<std::mutex> fsynclk(oplogApplierLockedFsync);
      
              // Obtain the validation lock to synchronise batch application with validation.
              auto lk = collection_validation::obtainExclusiveValidationLock(&opCtx);
      

      Does POA needs the same?

      This ticket is to handle VALIDATE only. See SERVER-139205 for fsync.

      Solution idea:
      Each time a batch is dispatched, POA takes the validation lock in MODE_IX. The lock is stashed with the rest of the in-flight batch's metadata and handed to the batch tracker. When the batch has been completed, the batch tracker unlocks it for one MODE_IX.

      Meanwhile, validate should start taking the validation lock in MODE_S.

      This means that POA and validate can't run concurrently because MODE_IX and MODE_S conflict. However, several POA batches can be in-flight at once, because multiple callers can lock in MODE_IX at once. Also, multiple validates can run concurrently because multiple MODE_S can run at once.

            Assignee:
            Vishnu Kaushik
            Reporter:
            Vishnu Kaushik
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: