summaryrefslogtreecommitdiff
path: root/src/mongo/db
diff options
context:
space:
mode:
authorLouis Williams <louis.williams@mongodb.com>2018-05-17 14:42:07 -0400
committerLouis Williams <louis.williams@mongodb.com>2018-05-18 11:00:05 -0400
commitae577bdd397a29eab9bf7e7182bfad034fdf1f04 (patch)
treeca9650eeb7c187d928f5d4191bfce1ebfc941c08 /src/mongo/db
parentb639a8a2b0b037dcf5407683e1698cec3a246fad (diff)
downloadmongo-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.h10
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