ReplicationCoordinatorImpl::_reportUpstream_inlock() should always release lock on return.

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Minor - P4
    • 3.3.4
    • Affects Version/s: None
    • Component/s: Replication
    • None
    • Fully Compatible
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      Currently, _reportUpstream_inlock(unique_lock* lock) does not guarantee the state of lock upon return. This makes it harder to reason about code in which we subsequently invoke functions (such as updateTerm_incallback()) that expect to lock the mutex:

      replication_coordinator_impl.cpp:443

          _reportUpstream_inlock(&lk);
          _externalState->setGlobalTimestamp(lastOpTime.getTimestamp());
          // Step down is impossible, so we don't need to wait for the returned event.
          _updateTerm_incallback(term);
      

            Assignee:
            Benety Goh
            Reporter:
            Benety Goh
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: