diff options
author | Samyukta Lanka <samy.lanka@mongodb.com> | 2019-09-03 21:36:32 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-09-03 21:36:32 +0000 |
commit | 720e7b216316eac5f5dc18f26684cd2ca1ed17e2 (patch) | |
tree | 18090b262a585c6b085d1678550e46d2ac973f40 /src/mongo/db/commands.h | |
parent | ff685d2d6e370594261eccbef8e60b2f7cc61e28 (diff) | |
download | mongo-720e7b216316eac5f5dc18f26684cd2ca1ed17e2.tar.gz |
SERVER-41359 Stop upconverting readConcern to snapshot internally for transactions
Diffstat (limited to 'src/mongo/db/commands.h')
-rw-r--r-- | src/mongo/db/commands.h | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/mongo/db/commands.h b/src/mongo/db/commands.h index 35ac31fcddb..f355df6289c 100644 --- a/src/mongo/db/commands.h +++ b/src/mongo/db/commands.h @@ -472,16 +472,9 @@ public: virtual bool supportsWriteConcern() const = 0; /** - * Returns true if this Command supports the given readConcern level. Takes the command object - * and the name of the database on which it was invoked as arguments, so that readConcern can be - * conditionally rejected based on the command's parameters and/or namespace. - * - * If a readConcern level argument is sent to a command that returns false the command processor - * will reject the command, returning an appropriate error message. - * - * Note that this is never called on mongos. Sharded commands are responsible for forwarding - * the option to the shards as needed. We rely on the shards to fail the commands in the - * cases where it isn't supported. + * Returns true if this command invocation supports the given readConcern level. This only + * applies when running outside transactions because all commands that are allowed to run in a + * transaction must support all the read concerns that can be used in a transaction. */ virtual bool supportsReadConcern(repl::ReadConcernLevel level) const { return level == repl::ReadConcernLevel::kLocalReadConcern; @@ -623,6 +616,10 @@ public: * If a readConcern level argument is sent to a command that returns false the command processor * will reject the command, returning an appropriate error message. * + * This only applies when running outside transactions because all commands that are allowed to + * run in a transaction must support all the read concerns that can be used in a + * transaction. + * * Note that this is never called on mongos. Sharded commands are responsible for forwarding * the option to the shards as needed. We rely on the shards to fail the commands in the * cases where it isn't supported. |