1
0
Fork 0

Have twice seen coordinator go into long loop on shutdown. Added two tests for isStopping() to break the loops. (#4138)

This commit is contained in:
Matthew Von-Maszewski 2017-12-21 14:32:16 -05:00 committed by Jan
parent f8acbd9fae
commit cb56f0acf1
2 changed files with 11 additions and 11 deletions

View File

@ -1456,8 +1456,8 @@ AgencyCommResult AgencyComm::sendWithFailover(
continue;
}
// got a result, we are done
if (result.successful()) {
// got a result or shutdown, we are done
if (result.successful() || application_features::ApplicationServer::isStopping()) {
AgencyCommManager::MANAGER->release(std::move(connection), endpoint);
break;
}

View File

@ -1693,7 +1693,7 @@ int ClusterInfo::ensureIndexCoordinator(
int errorCode = ensureIndexCoordinatorWithoutRollback(
databaseName, collectionID, idString, slice, create, compare, resultBuilder, errorMsg, timeout);
if (errorCode == TRI_ERROR_NO_ERROR) {
if (errorCode == TRI_ERROR_NO_ERROR || application_features::ApplicationServer::isStopping()) {
return errorCode;
}