Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-48149

Move callers of waitUntilDurable onto JournalFlusher::waitForJournalFlush

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.7.0, 4.4.5
    • Affects Version/s: None
    • Component/s: Storage
    • None
    • Fully Compatible
    • v4.4
    • Execution Team 2020-06-15, Execution Team 2020-06-29, Execution Team 2020-09-07
    • 7

      There have been issues where threads running concurrently with stepdown call waitUntilDurable independently.

      Stepdown changes the behavior of waitUntilDurable to stop doing writes to the oplogTruncateAfterPoint document and then clears the oplogTruncateAfterPoint timestamp. It does this with careful interruption of the JournalFlusher thread that does async waitUntilDurable calls. However, operations running concurrently with stepdown sometimes require durability and call waitUntilDurable directly: these operations are not carefully interrupted by stepdown prior to stepdown clearing the oplogTruncateAfterPoint timestamp. Consequently, the oplogTruncateAfterPoint can remain set after stepdown, which it should not be.

      --------------------

      waitUntilUnjournaledWritesDurable and flushAllFiles are callers of waitUntilDurable, but cannot be moved onto the JournalFlusher thread because they provide parameter settings that the JournalFlusher does not. The interface to using these two functions should be made very explicit about the risk of running concurrently with stepdown. Today, I do not believe there are any callers that can run concurrently with stepdown.

      --------------------

      This will actually be a bit tricky because we will probably have to make sure that new JournalFlusher::waitForJournalFlush callers can retry if interrupted by stepdown (or whatever interrupts the JournalFlusher thread).

            Assignee:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Reporter:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: