1
0
Fork 0

suppress some of these dreaded error messages (#6786)

This commit is contained in:
Jan 2018-10-11 10:46:12 +02:00 committed by GitHub
parent 4644d2b023
commit c7cd0262aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 19 deletions

View File

@ -1009,11 +1009,11 @@ void ClusterInfo::loadCurrent() {
return;
}
LOG_TOPIC(ERR, Logger::CLUSTER) << "Error while loading " << prefixCurrent
<< " httpCode: " << result.httpCode()
<< " errorCode: " << result.errorCode()
<< " errorMessage: " << result.errorMessage()
<< " body: " << result.body();
LOG_TOPIC(DEBUG, Logger::CLUSTER) << "Error while loading " << prefixCurrent
<< " httpCode: " << result.httpCode()
<< " errorCode: " << result.errorCode()
<< " errorMessage: " << result.errorMessage()
<< " body: " << result.body();
}
/// @brief ask about a collection

View File

@ -414,8 +414,10 @@ void HeartbeatThread::runDBServer() {
AgencyCommResult result = _agency.sendTransactionWithFailover(trx, 1.0);
if (!result.successful()) {
LOG_TOPIC(WARN, Logger::HEARTBEAT)
<< "Heartbeat: Could not read from agency!";
if (!application_features::ApplicationServer::isStopping()) {
LOG_TOPIC(WARN, Logger::HEARTBEAT)
<< "Heartbeat: Could not read from agency!";
}
} else {
VPackSlice agentPool = result.slice()[0].get(".agency");
@ -586,10 +588,12 @@ void HeartbeatThread::runSingleServer() {
"/.agency"}));
AgencyCommResult result = _agency.sendTransactionWithFailover(trx, timeout);
if (!result.successful()) {
LOG_TOPIC(WARN, Logger::HEARTBEAT)
<< "Heartbeat: Could not read from agency! status code: "
<< result._statusCode << ", incriminating body: "
<< result.bodyRef() << ", timeout: " << timeout;
if (!application_features::ApplicationServer::isStopping()) {
LOG_TOPIC(WARN, Logger::HEARTBEAT)
<< "Heartbeat: Could not read from agency! status code: "
<< result._statusCode << ", incriminating body: "
<< result.bodyRef() << ", timeout: " << timeout;
}
if (!applier->isActive()) { // assume agency and leader are gone
ServerState::instance()->setFoxxmaster(_myId);
@ -835,10 +839,12 @@ void HeartbeatThread::runCoordinator() {
AgencyCommResult result = _agency.sendTransactionWithFailover(trx, timeout);
if (!result.successful()) {
LOG_TOPIC(WARN, Logger::HEARTBEAT)
<< "Heartbeat: Could not read from agency! status code: "
<< result._statusCode << ", incriminating body: "
<< result.bodyRef() << ", timeout: " << timeout;
if (!application_features::ApplicationServer::isStopping()) {
LOG_TOPIC(WARN, Logger::HEARTBEAT)
<< "Heartbeat: Could not read from agency! status code: "
<< result._statusCode << ", incriminating body: "
<< result.bodyRef() << ", timeout: " << timeout;
}
} else {
VPackSlice agentPool = result.slice()[0].get(".agency");

View File

@ -27,6 +27,7 @@
#include <velocypack/velocypack-aliases.h>
#include "Agency/AgencyComm.h"
#include "ApplicationFeatures/ApplicationServer.h"
#include "Cluster/ClusterComm.h"
#include "Cluster/ClusterInfo.h"
#include "Cluster/ServerState.h"
@ -1110,11 +1111,13 @@ static void JS_setFoxxmasterQueueupdate(v8::FunctionCallbackInfo<v8::Value> cons
std::string key = "Current/FoxxmasterQueueupdate";
VPackSlice val = queueUpdate ? VPackSlice::trueSlice() : VPackSlice::falseSlice();
AgencyCommResult result = comm.setValue(key, val, 0.0);
if (!result.successful()) {
THROW_AGENCY_EXCEPTION(result);
if (result.successful()) {
result = comm.increment("Current/Version");
}
result = comm.increment("Current/Version");
if (!result.successful()) {
if (!result.successful() &&
result.errorCode() != TRI_ERROR_SHUTTING_DOWN &&
!application_features::ApplicationServer::isStopping()) {
// gracefully ignore any shutdown errors here
THROW_AGENCY_EXCEPTION(result);
}
}