[SERVER-65500] Unprotected concurrent access to coordinator doc member variable by DDL coordinator implementations Created: 12/Apr/22  Updated: 06/Dec/22  Resolved: 13/Apr/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Randolph Tan Assignee: [DO NOT USE] Backlog - Sharding EMEA
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-62432 Ensure safe access to ShardingDDLCoor... Closed
Related
related to SERVER-66439 Concurrent `checkIfOptionsConflict` r... Closed
Assigned Teams:
Sharding EMEA
Participants:

 Description   

Current implementations of some DDL coordinators access the _doc member variable inside checkIfOptionsConflict and reportCurrentOp without any concurrency control even though it can be modified when _runImpl is being executed.

For example, in RefineCollectionShardKeyCoordinator coordinator doc is read here:
https://github.com/10gen/mongo/blob/b4384a6a6774ae494e57adc0c625769fec107828/src/mongo/db/s/refine_collection_shard_key_coordinator.cpp#L71
https://github.com/10gen/mongo/blob/b4384a6a6774ae494e57adc0c625769fec107828/src/mongo/db/s/refine_collection_shard_key_coordinator.cpp#L82

And modified here:
https://github.com/10gen/mongo/blob/b4384a6a6774ae494e57adc0c625769fec107828/src/mongo/db/s/refine_collection_shard_key_coordinator.cpp#L114


Generated at Thu Feb 08 06:02:53 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.