PSMDB-2023 Abandon snapshot after catalog reopen in FCBIS storage switch#1770
PSMDB-2023 Abandon snapshot after catalog reopen in FCBIS storage switch#1770igorsol merged 1 commit intorelease-8.0.20-8from
Conversation
SERVER-108364 added allowOneUntimestampedWrite() to _updateMinValidDocument which invariants if recovery unit is active. openCatalogAfterStorageChange() can leave the RU active, so callers that subsequently invoke setMinValid() hit the invariant. Abandon the snapshot before returning from _switchStorageLocation to ensure the RU is inactive.
Backport Policy Overview@igorsol, This branch ( Next step: Please re-open this PR against Please reach out in #server-release if you have any questions. |
There was a problem hiding this comment.
Pull request overview
This PR prevents setMinValid() callers from hitting an invariant after an FCBIS storage location switch by ensuring the OperationContext’s RecoveryUnit is no longer in an active snapshot/WT transaction state after openCatalogAfterStorageChange().
Changes:
- Abandon the current recovery unit snapshot after
catalog::openCatalogAfterStorageChange(opCtx)in_switchStorageLocation(). - Add an explanatory comment describing why the snapshot must be abandoned before subsequent
setMinValid()calls.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
SERVER-108364 added allowOneUntimestampedWrite() to _updateMinValidDocument which invariants if recovery unit is active.
openCatalogAfterStorageChange() can leave the RU active, so callers that subsequently invoke setMinValid() hit the invariant. Abandon the snapshot before returning from _switchStorageLocation to ensure the RU is inactive.