-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Catalog and Routing
-
CAR Team 2026-08-31, CAR Team 2026-09-14, CAR Team 2026-09-28, CAR Team 2026-10-12
-
🟦 Shard Catalog
-
None
-
None
-
None
-
None
-
None
-
None
The authoritative shards metadata recovery process has to navigate a lot of race conditions successfully.
One of these involves the way it waits until it's safe to read at a given timestamp. As explained in this comment the recoverer has to do the following series of steps in a deliberate order:
- Install the recoverer so that it tracks oplog entries arriving after its installation
- Wait until a timestamp at or after the recoverer was installed is snapshot readable
- Read at that snapshot
- Drain the oplog entries and install the metadata
A potential source of sudden delays involves the wait for the timestamp to become available.
In principle with this approach the only possible timestamp usable for the recoverer is the lastWritten timestamp since it's the top-most timestamp on the node with no other writes more recent than it. However, in order to support the snapshot read that timestamp has to become majority available, and this can take a prolonged amount of time under unfavourable conditions.
- related to
-
SERVER-134436 Add debug assertion that ensures no oplog entries have been lost during sharding recovery
-
- In Code Review
-