summaryrefslogtreecommitdiff
path: root/src/mongo/db
diff options
context:
space:
mode:
authorVesselina Ratcheva <vesselina.ratcheva@10gen.com>2019-01-31 18:28:36 -0500
committerVesselina Ratcheva <vesselina.ratcheva@10gen.com>2019-02-06 14:45:38 -0500
commit133fa7293bc729ff95cacd9384ad49c928e8e0a8 (patch)
treedb1548af4d96996496cab4a573925956f64d5a8b /src/mongo/db
parentf1b64f7fa6b071cde41498961c147b533893ad33 (diff)
downloadmongo-133fa7293bc729ff95cacd9384ad49c928e8e0a8.tar.gz
SERVER-39139 Disallow commitTransaction and abortTransaction commands on secondaries
Diffstat (limited to 'src/mongo/db')
-rw-r--r--src/mongo/db/commands/txn_cmds.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/commands/txn_cmds.cpp b/src/mongo/db/commands/txn_cmds.cpp
index f1a90e63510..7b84b3a210b 100644
--- a/src/mongo/db/commands/txn_cmds.cpp
+++ b/src/mongo/db/commands/txn_cmds.cpp
@@ -56,7 +56,7 @@ public:
CmdCommitTxn() : BasicCommand("commitTransaction") {}
AllowedOnSecondary secondaryAllowed(ServiceContext*) const override {
- return AllowedOnSecondary::kAlways;
+ return AllowedOnSecondary::kNever;
}
virtual bool adminOnly() const {
@@ -137,7 +137,7 @@ public:
CmdAbortTxn() : BasicCommand("abortTransaction") {}
AllowedOnSecondary secondaryAllowed(ServiceContext*) const override {
- return AllowedOnSecondary::kAlways;
+ return AllowedOnSecondary::kNever;
}
virtual bool adminOnly() const {