summaryrefslogtreecommitdiff
path: root/src/mongo/db/read_concern.h
diff options
context:
space:
mode:
authorSuganthi Mani <suganthi.mani@mongodb.com>2019-08-26 15:03:15 +0000
committerevergreen <evergreen@mongodb.com>2019-08-26 15:03:15 +0000
commit4197e3c394abea7d01084e035a6ce8af32dc1161 (patch)
treeee85e3dd0724a1d4384b893d082a35d28c236ee7 /src/mongo/db/read_concern.h
parentaaa9874e04dbc2a4a33aeb7bfad9bee60f7145e0 (diff)
downloadmongo-4197e3c394abea7d01084e035a6ce8af32dc1161.tar.gz
SERVER-39996 Moved setting ignorePrepared behavior outside of waitForReadConcern.
Diffstat (limited to 'src/mongo/db/read_concern.h')
-rw-r--r--src/mongo/db/read_concern.h21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/mongo/db/read_concern.h b/src/mongo/db/read_concern.h
index c9ac7f08e1c..cdb4a968682 100644
--- a/src/mongo/db/read_concern.h
+++ b/src/mongo/db/read_concern.h
@@ -45,16 +45,29 @@ class SpeculativeMajorityReadInfo;
} // namespace repl
/**
+ * Sets the prepare conflict behavior for a command.
+ *
+ * If the prepareConflictBehavior requested is to ignore prepare conflicts, then readConcernArgs
+ * are used to verify if the command is safe to ignore prepare conflicts, and if not, we
+ * enforce prepare conflicts.
+ */
+extern MONGO_DECLARE_SHIM((OperationContext * opCtx,
+ const repl::ReadConcernArgs& readConcernArgs,
+ PrepareConflictBehavior prepareConflictBehavior)
+ ->void) setPrepareConflictBehaviorForReadConcern;
+
+/**
* 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
* perform the wait. If allowAfterClusterTime is false returns an error if afterClusterTime is
- * set on the readConcernArgs. Both cmdName and readConcernArgs are used to determine whether or not
- * prepare conflicts can be ignored.
+ * set on the readConcernArgs.
+ *
+ * Note: Callers should use setPrepareConflictBehaviorForReadConcern method to set the desired
+ * prepare conflict behavior for their command.
*/
extern MONGO_DECLARE_SHIM((OperationContext * opCtx,
const repl::ReadConcernArgs& readConcernArgs,
- bool allowAfterClusterTime,
- PrepareConflictBehavior prepareConflictBehavior)
+ bool allowAfterClusterTime)
->Status) waitForReadConcern;
/*