diff options
author | Louis Williams <louis.williams@mongodb.com> | 2019-06-11 13:23:46 -0400 |
---|---|---|
committer | Louis Williams <louis.williams@mongodb.com> | 2019-06-11 13:23:46 -0400 |
commit | c23da6ac95bf5f687b6d21f2cc86f4775be88cd5 (patch) | |
tree | 01ddfa412a5cddf83a46eae66d387370fe4053b6 /src/mongo/db/commands/dbhash.cpp | |
parent | 01e68d5ac26a64b5b2d3a836428c07e3874488bf (diff) | |
download | mongo-c23da6ac95bf5f687b6d21f2cc86f4775be88cd5.tar.gz |
SERVER-41525 Use ignore_prepare=force for transactions that correctly do writes while ignoring prepare conflicts
Diffstat (limited to 'src/mongo/db/commands/dbhash.cpp')
-rw-r--r-- | src/mongo/db/commands/dbhash.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/db/commands/dbhash.cpp b/src/mongo/db/commands/dbhash.cpp index 7e861b43abb..7dc15854506 100644 --- a/src/mongo/db/commands/dbhash.cpp +++ b/src/mongo/db/commands/dbhash.cpp @@ -184,8 +184,9 @@ public: targetClusterTime); // The $_internalReadAtClusterTime option also causes any storage-layer cursors created - // during plan execution to block on prepared transactions. - opCtx->recoveryUnit()->setIgnorePrepared(false); + // during plan execution to block on prepared transactions. Since the dbhash command + // ignores prepare conflicts by default, change the behavior. + opCtx->recoveryUnit()->setPrepareConflictBehavior(PrepareConflictBehavior::kEnforce); } // We lock the entire database in S-mode in order to ensure that the contents will not |