summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2015-07-20 13:11:23 -0400
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2015-07-21 13:09:50 -0400
commita69663922c5e02c144ac0cf3139cba22dd8ddefb (patch)
tree8baadeec164d70fd0b2567628259f9e26df484a7
parent8f618d4928c1d44abacc8a48d5f398afc6cbdf80 (diff)
downloadmongo-a69663922c5e02c144ac0cf3139cba22dd8ddefb.tar.gz
SERVER-19500 Remove shard version checking for write command explain
Currently the write commands explain code calls ensureShardVersionOKOrThrow, which performs legacy style shard version checking based on the contents of the connection. This however does not have any effect, because write commands are not sent over versioned connections, so effectively write command explain is non-sharding aware currently. This change removes this check for the explain commands.
-rw-r--r--src/mongo/db/commands/write_commands/write_commands.cpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/mongo/db/commands/write_commands/write_commands.cpp b/src/mongo/db/commands/write_commands/write_commands.cpp
index db94b95d29d..50108ee66b5 100644
--- a/src/mongo/db/commands/write_commands/write_commands.cpp
+++ b/src/mongo/db/commands/write_commands/write_commands.cpp
@@ -49,7 +49,6 @@
#include "mongo/db/server_parameters.h"
#include "mongo/db/stats/counters.h"
#include "mongo/db/write_concern.h"
-#include "mongo/s/d_state.h"
namespace mongo {
@@ -211,8 +210,6 @@ Status WriteCmd::explain(OperationContext* txn,
AutoGetDb autoDb(txn, request.getNS().db(), MODE_IX);
Lock::CollectionLock colLock(txn->lockState(), request.getNS().ns(), MODE_IX);
- ensureShardVersionOKOrThrow(txn->getClient(), request.getNS().ns());
-
// Get a pointer to the (possibly NULL) collection.
Collection* collection = NULL;
if (autoDb.getDb()) {
@@ -249,8 +246,6 @@ Status WriteCmd::explain(OperationContext* txn,
AutoGetDb autoDb(txn, request.getNS().db(), MODE_IX);
Lock::CollectionLock colLock(txn->lockState(), request.getNS().ns(), MODE_IX);
- ensureShardVersionOKOrThrow(txn->getClient(), request.getNS().ns());
-
// Get a pointer to the (possibly NULL) collection.
Collection* collection = NULL;
if (autoDb.getDb()) {