ReplicaSetMonitor::check not thread safe wrt _master

XMLWordPrintableJSON

    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      It's possible for a thread to notifyFailure(), resetting the _master variable to -1, between the time when the _master variable is checked here and when it is actually used to access the nodes array. We need to acquire _lock to do this safely.

      There may be other issues here - the _check code modifies _master without locks in other places?

              Assignee:
              Randolph Tan
              Reporter:
              Greg Studer (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: