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

Investigate using a shared mutex for ReplicationCoordinatorImpl

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Replication

      During a PR discussion it was brought to light that users of ReplicationCoordinator are trying to work around methods that take the _mutex lock on the belief that it is a heavily contended mutex.

      As most of the time the operations performed are read operations (all const methods for example) it could be of interest to explore the usage of a shared_mutex.

      The only problem this could cause is with write-starvation. An option to tackle this is to set a preference on Linux via pthread_rwlockattr_setkind_np.

            Assignee:
            backlog-server-repl [DO NOT USE] Backlog - Replication Team
            Reporter:
            jordi.olivares-provencio@mongodb.com Jordi Olivares Provencio
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: