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

Replication should pause during fsync+lock

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Concurrency, Replication
    • Replication

      While a secondary is locked, replication attempts to get the write lock on the secondary. This causes future readers to block, since the write lock takes precedence, but readers ought to be able to proceed since the writer won't be unblocked soon.

      A potential workaround: Instead of blocking on the lock, fsync+lock on a secondary could simply pause the replication process (probably pausing the oplog reader and not take out the lock) and after writes have finished then flush all database files to get a consistent file system state.

      More likely workaround: wait for SERVER-1423 to be completed, in which case we'll get the correct behavior for free: readers will proceed even while writers are queued waiting for fsyncUnlock.

            Assignee:
            backlog-server-repl [DO NOT USE] Backlog - Replication Team
            Reporter:
            mathias@mongodb.com Mathias Stearn
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: