-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Replication
-
None
-
None
-
None
-
None
-
None
-
None
-
None
What
Replace `readLock()` with `writeLock()` for all `SharedPromise::emplaceValue` and `SharedPromise::setError` calls on the promise at line 2083 of `replication_coordinator_impl.h`.
Files: `replication_coordinator_impl.h` (line 2083).
Resolves: SERVER-108524
Why
`SharedPromise` allows only one fulfillment; using `readLock()` at the fulfillment site permits concurrent writers, violating the single-write contract and producing a data race. Replacing it with `writeLock()` restores mutual exclusion. Because Coverity cannot be run locally, the type change is the verifiable proof — Coverity's model for `SharedPromise::writeLock` enforces the single-writer constraint.
- is related to
-
SERVER-108524 Coverity analysis defect 162876: Data race condition
-
- Backlog
-