[SERVER-79653] Ensure that any write to the recovery document of a Sharding DDL coordinator is serialised Created: 03/Aug/23  Updated: 26/Oct/23

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

Type: Improvement Priority: Major - P3
Reporter: Paolo Polato Assignee: Backlog - Catalog and Routing
Resolution: Unresolved Votes: 0
Labels: oldshardingemea, shardingemea-qw
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Catalog and Routing
Participants:
Story Points: 3

 Description   

The ShardingDDLComponent infrastructure includes a state document to keep track of the progress of its execution; this object may be accessed by multiple threads, such as:

  • the executor running the coordinator itself (r/w)
  • $currentOps requests (r)

The DDL infrastructure also defines a mutex to protect the access to the doc, but it is still the responsibility of each implementation to enforce the right semantics.

The DDL infrastructure could instead provide a set of higher level primitives for accessing the recovery document object that implements the following semantics:

  • the DDL executor thread is the only one allowed to write onto the recovery document
  • no reads are allowed while a write is in progress

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