summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEsha Maharishi <esha.maharishi@mongodb.com>2019-02-27 17:37:23 -0500
committerEsha Maharishi <esha.maharishi@mongodb.com>2019-03-01 10:04:01 -0500
commit31de5655f1ea195748484a65c067beedf773c883 (patch)
tree4f149e0844747f086b01eebd8552146a91c46289
parente5ee880b03e4be83a56004d9e9d43852a6960eec (diff)
downloadmongo-31de5655f1ea195748484a65c067beedf773c883.tar.gz
SERVER-39880 Remove dead code remnants of voteCommitTransaction and voteAbortTransaction
-rw-r--r--src/mongo/db/commands.cpp9
-rw-r--r--src/mongo/db/commands/txn_two_phase_commit_cmds.idl19
-rw-r--r--src/mongo/db/transaction_validation.cpp3
3 files changed, 3 insertions, 28 deletions
diff --git a/src/mongo/db/commands.cpp b/src/mongo/db/commands.cpp
index 2fdbed18cfb..6dabe4252c9 100644
--- a/src/mongo/db/commands.cpp
+++ b/src/mongo/db/commands.cpp
@@ -124,19 +124,14 @@ const StringMap<int> txnCmdWhitelist = {{"abortTransaction", 1},
{"insert", 1},
{"killCursors", 1},
{"prepareTransaction", 1},
- {"update", 1},
- {"voteAbortTransaction", 1},
- {"voteCommitTransaction", 1}};
-
+ {"update", 1}};
// The commands that can be run on the 'admin' database in multi-document transactions.
const StringMap<int> txnAdminCommands = {{"abortTransaction", 1},
{"commitTransaction", 1},
{"coordinateCommitTransaction", 1},
{"doTxn", 1},
- {"prepareTransaction", 1},
- {"voteAbortTransaction", 1},
- {"voteCommitTransaction", 1}};
+ {"prepareTransaction", 1}};
} // namespace
diff --git a/src/mongo/db/commands/txn_two_phase_commit_cmds.idl b/src/mongo/db/commands/txn_two_phase_commit_cmds.idl
index 0b77fc9827f..1b36dff2d5e 100644
--- a/src/mongo/db/commands/txn_two_phase_commit_cmds.idl
+++ b/src/mongo/db/commands/txn_two_phase_commit_cmds.idl
@@ -46,25 +46,6 @@ commands:
strict: true
namespace: ignored
- voteCommitTransaction:
- description: "Parser for the 'voteCommitTransaction' command."
- namespace: ignored
- fields:
- shardId:
- description: "The shard name of the sender"
- type: shard_id
- prepareTimestamp:
- description: "Timestamp at which the sender prepared the transaction"
- type: timestamp
-
- voteAbortTransaction:
- description: "Parser for the 'voteAbortTransaction' command."
- namespace: ignored
- fields:
- shardId:
- description: "The shard name of the sender"
- type: shard_id
-
coordinateCommitTransaction:
description: "Parser for the 'coordinateCommitTransaction' command."
strict: false
diff --git a/src/mongo/db/transaction_validation.cpp b/src/mongo/db/transaction_validation.cpp
index c3d26da083b..dfd13ba85c4 100644
--- a/src/mongo/db/transaction_validation.cpp
+++ b/src/mongo/db/transaction_validation.cpp
@@ -68,8 +68,7 @@ const StringMap<int> sessionCheckOutList = {{"abortTransaction", 1},
{"update", 1}};
// Commands that can be sent with session info but should not check out a session.
-const StringMap<int> skipSessionCheckoutList = {
- {"coordinateCommitTransaction", 1}, {"voteAbortTransaction", 1}, {"voteCommitTransaction", 1}};
+const StringMap<int> skipSessionCheckoutList = {{"coordinateCommitTransaction", 1}};
bool commandCanCheckOutSession(StringData cmdName) {
return sessionCheckOutList.find(cmdName) != sessionCheckOutList.cend();