diff options
Diffstat (limited to 'src/mongo/db/commands.h')
-rw-r--r-- | src/mongo/db/commands.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mongo/db/commands.h b/src/mongo/db/commands.h index 72a6f1afda9..b11daed69f0 100644 --- a/src/mongo/db/commands.h +++ b/src/mongo/db/commands.h @@ -491,6 +491,14 @@ public: } /** + * Returns true if a command may be able to safely ignore prepare conflicts. Only commands that + * can guarantee they will only perform reads may ignore prepare conflicts. + */ + virtual bool canIgnorePrepareConflicts() const { + return false; + } + + /** * Returns true if this command invocation is allowed to utilize "speculative" majority reads to * service 'majority' read concern requests. This allows a query to satisfy a 'majority' read * without storage engine support for reading from a historical snapshot. @@ -624,6 +632,14 @@ public: return true; } + /** + * Returns true if a command may be able to safely ignore prepare conflicts. Only commands that + * can guarantee they will only perform reads may ignore prepare conflicts. + */ + virtual bool canIgnorePrepareConflicts() const { + return false; + } + private: std::unique_ptr<CommandInvocation> parse(OperationContext* opCtx, const OpMsgRequest& request) final; |