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

Do not call opObserver methods under ReplicationCoordinator mutex.

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

      Currently there is an opObserver method onMajorityCommitPointUpdate that is called under ReplicationCoordinator mutex on every commit point update. This not only has perf implications but is also dangerous. An opObserver method can be overridden by any interested party and thus can do arbitrary work, like performing I/O or acquiring certain locks that tend to cause deadlocks. We should move opObserver methods out of the ReplicationCoordinator mutex.

      Note that current overrides (e.g. this) of onMajorityCommitPointUpdate may depend on the ordering guaranteed by the ReplicationCoordinator mutex. If we move it outside of the mutex, the implementations of the overrides may need to be redesigned to account for the non-monotonic commit point.

            Assignee:
            Unassigned Unassigned
            Reporter:
            wenbin.zhu@mongodb.com Wenbin Zhu
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated: