StageInsertBatchResult::NoMeasurementsStaged leaks the WriteBatch created

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • 9.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Storage Execution
    • ALL
    • Storage Execution 2026-08-31
    • 0
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In the code path where stageInsertBatchIntoEligibleBucket returns StageInsertBatchResult::NoMeasurementsStaged, we create a WriteBatch on the bucket which is never committed or aborted. This means that the bucket can never reach the allCommitted state, and cannot be closed.

      This is a very rare edge case (SERVER-106380 did not add any tests which reproduce it because there was no clear way to hit it), but it was something we hit in production and added the NoMeasurementsStaged handling to fix.

            Assignee:
            Thomas Goyne
            Reporter:
            Thomas Goyne
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: