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

Move callers of waitUntilDurable onto JournalFlusher::waitForJournalFlush

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.7.0, 4.4.5
    • Component/s: Storage
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Backport Requested:
      v4.4
    • Sprint:
      Execution Team 2020-06-15, Execution Team 2020-06-29, Execution Team 2020-09-07
    • Linked BF Score:
      7

      Description

      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).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dianna.hohensee Dianna Hohensee
              Reporter:
              dianna.hohensee Dianna Hohensee
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: