SERVER-103744 introduced a debug assertion in acquireLocksForRenameCollectionWithinDBForApplyOps that CollectionCatalog::get(opCtx) == CollectionCatalog::latest(opCtx) to support the assumption that in that scenario CollectionCatalog::get(opCtx) can't return us an stale instance of the catalog (e.g. one that was stashed associated to an storage snapshot).
However this assertion can fail because the drop-pending ident reaper can concurrently write to the catalog, so that each side of the assertion sees a different instance (even though neither instance was stale).
We should change the assertion to check if there's an open storage snapshot instead.
- is related to
-
SERVER-103744 Deadlock between renameCollection, dbHash, and prepared transaction
-
- Closed
-