diff options
author | Louis Williams <louis.williams@mongodb.com> | 2018-05-17 14:42:07 -0400 |
---|---|---|
committer | Louis Williams <louis.williams@mongodb.com> | 2018-05-18 11:00:05 -0400 |
commit | ae577bdd397a29eab9bf7e7182bfad034fdf1f04 (patch) | |
tree | ca9650eeb7c187d928f5d4191bfce1ebfc941c08 /src/mongo/db | |
parent | b639a8a2b0b037dcf5407683e1698cec3a246fad (diff) | |
download | mongo-ae577bdd397a29eab9bf7e7182bfad034fdf1f04.tar.gz |
SERVER-35048 setIgnorePrepared should not uassert on storage engines that do not support prepared transactions
Diffstat (limited to 'src/mongo/db')
-rw-r--r-- | src/mongo/db/storage/recovery_unit.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mongo/db/storage/recovery_unit.h b/src/mongo/db/storage/recovery_unit.h index a69d08be2ce..6ebb600d45b 100644 --- a/src/mongo/db/storage/recovery_unit.h +++ b/src/mongo/db/storage/recovery_unit.h @@ -83,10 +83,12 @@ public: "This storage engine does not support prepared transactions"); } - virtual void setIgnorePrepared(bool ignore) { - uasserted(ErrorCodes::CommandNotSupported, - "This storage engine does not support prepared transactions"); - } + + /** + * Sets whether or not to ignore prepared transactions if supported by this storage engine. When + * 'ignore' is true, allows reading data in prepared, but uncommitted transactions. + */ + virtual void setIgnorePrepared(bool ignore) {} /** * Waits until all commits that happened before this call are durable in the journal. Returns |