diff options
author | Randolph Tan <randolph@10gen.com> | 2018-09-25 16:52:27 -0400 |
---|---|---|
committer | Randolph Tan <randolph@10gen.com> | 2018-09-27 10:31:35 -0400 |
commit | 5674fa1f3087f65ea326b33f5b81647d4dcfb8d6 (patch) | |
tree | be74b03f086a8a338c5354eaf9b2e5f2d86d8996 /src/mongo/db/commands.h | |
parent | f58a039003b982d40de3ce1be56563270f6b78de (diff) | |
download | mongo-5674fa1f3087f65ea326b33f5b81647d4dcfb8d6.tar.gz |
SERVER-37239 Router should validate if commands are allowed to run within transactions
Diffstat (limited to 'src/mongo/db/commands.h')
-rw-r--r-- | src/mongo/db/commands.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/db/commands.h b/src/mongo/db/commands.h index f49c9e3792e..d0a29a025ec 100644 --- a/src/mongo/db/commands.h +++ b/src/mongo/db/commands.h @@ -237,6 +237,11 @@ struct CommandHelpers { const Command* command, const OpMsgRequest& request); + /** + * Returns OK if command is allowed to run under a transaction in the given database. + */ + static Status canUseTransactions(StringData dbName, StringData cmdName); + static constexpr StringData kHelpFieldName = "help"_sd; }; |