Skip to content

Commit a42a3d9

Browse files
committed
SERVER-23784 Don't use 30 second network timeout when sending commands to Shards
1 parent 5f0f211 commit a42a3d9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/mongo/s/client/shard_registry.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -739,7 +739,11 @@ StatusWith<ShardRegistry::CommandResponse> ShardRegistry::_runCommandWithMetadat
739739
}
740740

741741
executor::RemoteCommandRequest request(
742-
host.getValue(), dbName, cmdObj, metadata, kConfigCommandTimeout);
742+
host.getValue(),
743+
dbName,
744+
cmdObj,
745+
metadata,
746+
shard->isConfig() ? kConfigCommandTimeout : executor::RemoteCommandRequest::kNoTimeout);
743747
StatusWith<executor::RemoteCommandResponse> responseStatus =
744748
Status(ErrorCodes::InternalError, "Internal error running command");
745749

0 commit comments

Comments
 (0)