[SERVER-83988] Investigate invariant in CollectionCatalog::write Created: 07/Dec/23  Updated: 11/Dec/23  Resolved: 11/Dec/23

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

Type: Bug Priority: Major - P3
Reporter: Louis Williams Assignee: Josef Ahmad
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
Related
related to SERVER-81971 Explore removing the BatchedCollectio... Backlog
Assigned Teams:
Catalog and Routing
Operating System: ALL
Sprint: CAR Team 2023-12-25
Participants:

 Comments   
Comment by Josef Ahmad [ 11/Dec/23 ]

This is a 5.0 incarnation of SERVER-79982, which has been backported to 7.0 only. Callers of CollectionCatalog::write should acquire the global lock in IX mode at a minimum to avoid racing with the batched collection writer. In this failure instance, SetProfilingFilterGloballyCmd doesn't acquire the lock in 5.0, and that opened the opportunity to interleave with another operation holding the batched collection catalog writer, and eventually fail the invariant that we should be holding the exclusive lock.

I'm duplicating this ticket behind the SERVER-79982 backports back to 5.0, which is the version that introduces the batched catalog writer. cc: jordi.olivares-provencio@mongodb.com

As an additional note, we plan to remove the batched catalog writer via SERVER-81971, as the recent adoption of immutable data structures made copying the catalog sub-linear.

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