|
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.
|