summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/explain_cmd.cpp
diff options
context:
space:
mode:
authorMatthew Russotto <matthew.russotto@10gen.com>2017-03-06 17:51:46 -0500
committerMatthew Russotto <matthew.russotto@10gen.com>2017-03-06 17:51:46 -0500
commita271833d0edd7ca4aac67f3e7be55e102c631a93 (patch)
tree0a778dc3fd99a4df25505dbf49c724afcd4dff81 /src/mongo/db/commands/explain_cmd.cpp
parent3e5314c3f2be49666ca5d7aa766c934ba7d6cbe9 (diff)
downloadmongo-a271833d0edd7ca4aac67f3e7be55e102c631a93.tar.gz
SERVER-27914 Verify canAcceptWritesForDatabase() is called while the caller holds the global lock
This reverts commit 3e5314c3f2be49666ca5d7aa766c934ba7d6cbe9.
Diffstat (limited to 'src/mongo/db/commands/explain_cmd.cpp')
-rw-r--r--src/mongo/db/commands/explain_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/commands/explain_cmd.cpp b/src/mongo/db/commands/explain_cmd.cpp
index 1a53140e965..678fd7effa2 100644
--- a/src/mongo/db/commands/explain_cmd.cpp
+++ b/src/mongo/db/commands/explain_cmd.cpp
@@ -135,7 +135,7 @@ public:
// copied from Command::execCommand and should be abstracted. Until then, make
// sure to keep it up to date.
repl::ReplicationCoordinator* replCoord = repl::getGlobalReplicationCoordinator();
- bool iAmPrimary = replCoord->canAcceptWritesForDatabase(dbname);
+ bool iAmPrimary = replCoord->canAcceptWritesForDatabase_UNSAFE(txn, dbname);
bool commandCanRunOnSecondary = commToExplain->slaveOk();
bool commandIsOverriddenToRunOnSecondary = commToExplain->slaveOverrideOk() &&