summaryrefslogtreecommitdiff
path: root/src/mongo/db/read_concern.h
diff options
context:
space:
mode:
authorLouis Williams <louis.williams@mongodb.com>2019-03-26 16:10:05 -0400
committerLouis Williams <louis.williams@mongodb.com>2019-03-26 16:10:05 -0400
commit31a26cdd8900471c1bc9a934e8d4c16d06f611a3 (patch)
treeb6679fd95dc56e8ae155aef2d58245bc3dbfc24e /src/mongo/db/read_concern.h
parentaaa404d9d7e56a1d327f72e505f4e67b4a821959 (diff)
downloadmongo-31a26cdd8900471c1bc9a934e8d4c16d06f611a3.tar.gz
SERVER-40227 Pass ignore prepare behavior from a command attribute rather than using a whitelist
Diffstat (limited to 'src/mongo/db/read_concern.h')
-rw-r--r--src/mongo/db/read_concern.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mongo/db/read_concern.h b/src/mongo/db/read_concern.h
index 5f66a46f26c..8e8ca0b3575 100644
--- a/src/mongo/db/read_concern.h
+++ b/src/mongo/db/read_concern.h
@@ -43,6 +43,14 @@ class ReadConcernArgs;
class SpeculativeMajorityReadInfo;
}
+enum class PrepareConflictBehavior {
+ /* When prepare conflicts are encountered, block until the conflict is resolved. */
+ kEnforce,
+ /* Ignore prepare conflicts when they are encountered. This should only be enabled for
+ * operations than only perform reads. */
+ kIgnore
+};
+
/**
* Given the specified read concern arguments, performs checks that the read concern can actually be
* satisfied given the current state of the server and if so calls into the replication subsystem to
@@ -53,7 +61,7 @@ class SpeculativeMajorityReadInfo;
extern MONGO_DECLARE_SHIM((OperationContext * opCtx,
const repl::ReadConcernArgs& readConcernArgs,
bool allowAfterClusterTime,
- StringData cmdName)
+ PrepareConflictBehavior prepareConflictBehavior)
->Status) waitForReadConcern;
/*