Skip to content

Commit

Permalink
SERVER-7034 add 10 second timeouts to three connections
Browse files Browse the repository at this point in the history
Change the timeout on three ScopedDbConnections (made while holding
a critical section) from default of zero (no timeout) to 10 seconds.
  • Loading branch information
Tad Marshall committed Oct 16, 2012
1 parent 3e32f36 commit c35bd13
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/mongo/s/d_migrate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1128,7 +1128,8 @@ namespace mongo {
{
BSONObj res;
scoped_ptr<ScopedDbConnection> connTo(
ScopedDbConnection::getScopedDbConnection( toShard.getConnString() ) );
ScopedDbConnection::getScopedDbConnection( toShard.getConnString(),
10.0 ) );

bool ok;

Expand Down Expand Up @@ -1276,7 +1277,8 @@ namespace mongo {
try {
scoped_ptr<ScopedDbConnection> conn(
ScopedDbConnection::getInternalScopedDbConnection(
shardingState.getConfigServer() ) );
shardingState.getConfigServer(),
10.0 ) );
ok = conn->get()->runCommand( "config" , cmd , cmdResult );
conn->done();
}
Expand All @@ -1303,7 +1305,8 @@ namespace mongo {
try {
scoped_ptr<ScopedDbConnection> conn(
ScopedDbConnection::getInternalScopedDbConnection(
shardingState.getConfigServer() ) );
shardingState.getConfigServer(),
10.0 ) );

// look for the chunk in this shard whose version got bumped
// we assume that if that mod made it to the config, the applyOps was successful
Expand Down

0 comments on commit c35bd13

Please sign in to comment.