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
    • 0
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The POA dispatcher, on receiving a batch from the OplogApplierBatcher, tries to decide whether the batch should be serialized or pipelined. It does this by inspecting the oplog entries of the batch and then runs OplogApplierBatcher's getBatchActionForEntry(). The function returns whether the entry should be kProcessIndividually or kStartNewBatch, which the dispatcher interprets as "should serialize" or kContinueBatch, which the dispatcher interprets as "should pipeline" - and then accordingly the POA dispatcher serializes the batch or pipelines it.

      However, for a truncateRange oplog entry, the OplogApplierBatcher also needs more info to know whether it should be processed individually / in a new batch truncateRange or if it can be mixed with other oplog entries in the batch. It does so by looking at the bounds of truncation, and ensuring that no oplog entry within the same batch has a timestamp that will end up being truncated by the truncateRange.

      When POA gets a batch with a truncateRange, of course, the OplogApplierBatcher has already ensured that truncateRange will not truncate entries within that batch itself. Therefore when getBatchActionForEntry() is run on the batch, the function always returns kContinueBatch, because the OplogApplierBatcher ensured that the firstEntryInBatch is always safe to truncate.

      This was fine in classic oplog application (OplogApplierImpl), because only one batch is processed at a time. But in POA, we have to look at the oldest batch currently in-flight, because multiple batches may be in-flight at any given instant. And the oldest batch in-flight may be have operations that are within the bounds that truncateRange may try to truncate.

      The solution I'm going with is for POA to use the lastApplied to determine whether a batch should be serialized or not.

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

              Created:
              Updated:
              Resolved: