Access to ReplicationConsistencyMarkersImpl private data members is not always protected by mutex

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Replication
    • Fully Compatible
    • ALL
    • v8.0
    • 200
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      At stepdown or shutdown, ReplicationCoordinatorExternalStateImpl::_stopAsyncUpdatesOfAndClearOplogTruncateAfterPoint calls _replicationProcess->getConsistencyMarkers()->setOplogTruncateAfterPoint(opCtx, Timestamp()) and the comment about there not being any oplog holes to worry about locking for is correct, but setOplogTruncateAfterPoint() also resets _lastNoHolesOplogTimestamp and _lastNoHolesOplogOpTimeAndWallTime. Stepdown and shutdown could concurrently call _stopAsyncUpdatesOfAndClearOplogTruncateAfterPoint() resulting in a double destruction.

            Assignee:
            Nick Shectman
            Reporter:
            Nick Shectman
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: