Use hazard pointers for reading replica-set configuration

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Duplicate
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Internal Code
    • None
    • Service Arch
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      Make the _rsConfig in ReplicationCoordinatorImpl hazard pointer protected. There are a ton of methods that just lock the (very hot) _mutex just to read the config, and unlock before acting on it. Given that callers are already OK with accepting stale returns (otherwise they would need to hold the mutex themselves) it should be safe. Examples include but are not limited to all of these.

            Assignee:
            Unassigned
            Reporter:
            Amirsaman Memaripour
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: