diff options
author | Pierlauro Sciarelli <pierlauro.sciarelli@mongodb.com> | 2021-03-18 17:41:02 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-03-18 18:46:00 +0000 |
commit | 138acafd27f145622506ef422a48c056fb4883df (patch) | |
tree | 1e7ddbf54388153ec413a1dfdd4417335a10a9de /src/mongo | |
parent | fbb39fe5941ca3cbc6ce2623bd5e983ac83a0ba7 (diff) | |
download | mongo-138acafd27f145622506ef422a48c056fb4883df.tar.gz |
SERVER-54333 Consider increasing MigrationDestinationManager::startCommit timeout
Diffstat (limited to 'src/mongo')
-rw-r--r-- | src/mongo/db/s/migration_destination_manager.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mongo/db/s/migration_destination_manager.cpp b/src/mongo/db/s/migration_destination_manager.cpp index 898e2a8d001..80ad3ad1402 100644 --- a/src/mongo/db/s/migration_destination_manager.cpp +++ b/src/mongo/db/s/migration_destination_manager.cpp @@ -571,7 +571,10 @@ Status MigrationDestinationManager::startCommit(const MigrationSessionId& sessio _state = COMMIT_START; _stateChangedCV.notify_all(); - auto const deadline = Date_t::now() + Seconds(30); + // Assigning a timeout slightly higher than the one used for network requests to the config + // server. Enough time to retry at least once in case of network failures (SERVER-51397). + auto const deadline = Date_t::now() + Shard::kDefaultConfigCommandTimeout + + Shard::kDefaultConfigCommandTimeout / 4; while (_sessionId) { if (stdx::cv_status::timeout == _isActiveCV.wait_until(lock, deadline.toSystemTimePoint())) { |