-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Replication
-
None
-
None
-
None
-
None
-
None
-
None
-
None
What
Add `GUARDED_BY(_threadMutex)` to the member fields in `ReplicationCoordinatorExternalStateImpl` that are accessed without the mutex, and `REQUIRES(_threadMutex)` to the private helpers that read or write them. Fix all callers that must acquire the lock before invoking those helpers.
Files: `replication_coordinator_external_state_impl.cpp` (lines 351, 361, 512, 517, 522, 538, 595).
Resolves: SERVER-108741, SERVER-108742, SERVER-110036, SERVER-110582, SERVER-110600, SERVER-114009, SERVER-114010
Why
Coverity flags these members because they are written on one thread and read on another with no visible synchronization. Coverity cannot be run locally, so it is hard to verify whether a fix actually resolves a finding — a code change that looks correct might still leave the access pattern ambiguous to the analyzer. `GUARDED_BY` and `REQUIRES` annotations give the compiler the same information Coverity needs: every future callsite that touches these fields without `_threadMutex` is a build error. This makes the fix verifiable in the normal build and prevents the issue from being reintroduced on these variables in the future.
- is related to
-
SERVER-108741 Coverity analysis defect 154620: Data race condition
-
- Backlog
-
-
SERVER-108742 Coverity analysis defect 154619: Data race condition
-
- Backlog
-
-
SERVER-110036 Coverity analysis defect 145286: Data race condition
-
- Backlog
-
-
SERVER-110582 Coverity analysis defect 176315: Data race condition
-
- Backlog
-
-
SERVER-110600 Coverity analysis defect 176096: Data race condition
-
- Backlog
-
-
SERVER-114009 Coverity analysis defect 177611: Data race condition
-
- Backlog
-
-
SERVER-114010 Coverity analysis defect 177608: Data race condition
-
- Backlog
-