diff options
author | Louis Williams <louis.williams@mongodb.com> | 2019-03-26 16:10:05 -0400 |
---|---|---|
committer | Louis Williams <louis.williams@mongodb.com> | 2019-03-26 16:10:05 -0400 |
commit | 31a26cdd8900471c1bc9a934e8d4c16d06f611a3 (patch) | |
tree | b6679fd95dc56e8ae155aef2d58245bc3dbfc24e /src/mongo/db/read_concern.h | |
parent | aaa404d9d7e56a1d327f72e505f4e67b4a821959 (diff) | |
download | mongo-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.h | 10 |
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; /* |