diff options
author | Daniel Gottlieb <daniel.gottlieb@mongodb.com> | 2022-07-25 14:45:21 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-07-26 17:57:14 +0000 |
commit | c90a8e578049d9921175fcd7db5f3e1becfa9076 (patch) | |
tree | d0567a9d61ea12801e13f225a95f837510287703 /src/mongo/db/repair.cpp | |
parent | aa6a253f8b9c9023377870d47240784679077a0a (diff) | |
download | mongo-c90a8e578049d9921175fcd7db5f3e1becfa9076.tar.gz |
SERVER-65971: Have _restoreTxnsTableEntryFromRetryableWrites declare its intent as an untimestamped write.
Diffstat (limited to 'src/mongo/db/repair.cpp')
-rw-r--r-- | src/mongo/db/repair.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mongo/db/repair.cpp b/src/mongo/db/repair.cpp index c880b32487b..a6f8029be24 100644 --- a/src/mongo/db/repair.cpp +++ b/src/mongo/db/repair.cpp @@ -71,6 +71,13 @@ using namespace fmt::literals; Status rebuildIndexesForNamespace(OperationContext* opCtx, const NamespaceString& nss, StorageEngine* engine) { + if (opCtx->recoveryUnit()->isActive()) { + // This function is shared by multiple callers. Some of which have opened a transaction to + // perform reads. This function may make mixed-mode writes. Mixed-mode assertions can only + // be suppressed when beginning a fresh transaction. + opCtx->recoveryUnit()->abandonSnapshot(); + } + opCtx->checkForInterrupt(); auto collection = CollectionCatalog::get(opCtx)->lookupCollectionByNamespace(opCtx, nss); auto swIndexNameObjs = getIndexNameObjs(collection); |