Remove test-only synchronous flush API

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Storage Execution
    • Storage Execution 2026-09-28
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In advance of SERVER-134042, remove flushSync_forTest(). The problem this ticket addresses is that once the flusher thread starts emitting watermarks, it's very difficult to coordinate a synchronous flush between the oplog tailer thread, the SizeCountCheckpointBuffer, and the flusher thread. In production, the sequence of events is as follows:

      1. Signal flush thread to write watermark, then block on the oplog tailer thread seeing the watermark
      2. Wake up oplog tailer thread to consume the watermark
      3. Wake up the flusher thread and persist the batch

      flushSync_forTest() would need to eliminate all this coordination between these threads, but then the function does not represent production behavior, and we risk unit-tests testing different functionality.

      The solution is to add a test helper, waitForFlush(), that can be used to exercise the production code path in unit tests.

            Assignee:
            Cedric Sirianni
            Reporter:
            Cedric Sirianni
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: