-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
ALL
-
Execution Team 2023-05-29
The interceptor is set to null in an onCommit hook after the catalog write is finished, while holding the collection MODE_IX lock (implicit collection creation). This used to be fine before the PIT catalog lookups, as the collection catalog is updated as the last onCommit hook handler.
After the PIT catalog project, once a collection is persisted in WT, a new catalog reader can create a Collection instance from WT and then take the shared state from a newer already existing collection (code).
SERVER-65006 added the onCommit hook to prevent the interceptor from being removed when the commit fails due to write conflict error, which would be retried without the interceptor.
Part of the issue is that index build code does not follow the usual pattern of acquiring locks and catalog inside the write conflict retry loop. In that case all state would be discarded on write conflict, including the interceptor being removed, and a fresh copy of the catalog taken to retry the operation.
- is related to
-
SERVER-65006 Write conflict on commitIndexBuild oplog entry insertion can cause multikey to fail to be set
- Closed
-
SERVER-77062 Perform copy-on-write of index catalog entries when cloning a collection
- Closed