diff --git a/arangod/Agency/Agent.cpp b/arangod/Agency/Agent.cpp index 00b3e54fa1..7d176f7391 100644 --- a/arangod/Agency/Agent.cpp +++ b/arangod/Agency/Agent.cpp @@ -133,10 +133,6 @@ bool Agent::activateStandbyAgent() { return true; } /// Start constituent personality void Agent::startConstituent() { activateAgency(); - - auto database = ApplicationServer::getFeature("Database"); - auto vocbase = database->vocbase(); - auto queryRegistry = QueryRegistryFeature::QUERY_REGISTRY; } // Waits here for confirmation of log's commits up to index. diff --git a/arangod/Cluster/AgencyCallback.cpp b/arangod/Cluster/AgencyCallback.cpp index 9390038051..c91cc82437 100644 --- a/arangod/Cluster/AgencyCallback.cpp +++ b/arangod/Cluster/AgencyCallback.cpp @@ -68,7 +68,8 @@ void AgencyCallback::refetchAndUpdate(bool needToAcquireMutex) { return; } - std::vector kv = basics::StringUtils::split(AgencyComm::prefixPath() + key,'/'); + std::vector kv = + basics::StringUtils::split(AgencyComm::prefixPath() + key,'/'); kv.erase(std::remove(kv.begin(), kv.end(), ""), kv.end()); std::shared_ptr newData = std::make_shared(); @@ -86,11 +87,14 @@ void AgencyCallback::checkValue(std::shared_ptr newData) { // Only called from refetchAndUpdate, we always have the mutex when // we get here! if (!_lastData || !_lastData->slice().equals(newData->slice())) { - LOG(DEBUG) << "AgencyCallback: Got new value " << newData->slice().typeName() << " " << newData->toJson(); + LOG_TOPIC(DEBUG, Logger::CLUSTER) + << "AgencyCallback: Got new value " << newData->slice().typeName() + << " " << newData->toJson(); if (execute(newData)) { _lastData = newData; } else { - LOG(DEBUG) << "Callback was not successful for " << newData->toJson(); + LOG_TOPIC(DEBUG, Logger::CLUSTER) + << "Callback was not successful for " << newData->toJson(); } } } @@ -98,7 +102,7 @@ void AgencyCallback::checkValue(std::shared_ptr newData) { bool AgencyCallback::executeEmpty() { // only called from refetchAndUpdate, we always have the mutex when // we get here! - LOG(DEBUG) << "Executing (empty)"; + LOG_TOPIC(DEBUG, Logger::CLUSTER) << "Executing (empty)"; bool result = _cb(VPackSlice::noneSlice()); if (result) { _cv.signal(); @@ -109,7 +113,7 @@ bool AgencyCallback::executeEmpty() { bool AgencyCallback::execute(std::shared_ptr newData) { // only called from refetchAndUpdate, we always have the mutex when // we get here! - LOG(DEBUG) << "Executing"; + LOG_TOPIC(DEBUG, Logger::CLUSTER) << "Executing"; bool result = _cb(newData->slice()); if (result) { _cv.signal(); @@ -127,7 +131,8 @@ void AgencyCallback::executeByCallbackOrTimeout(double maxTimeout) { if (!_cv.wait(static_cast(maxTimeout * 1000000.0))) { if (!_lastData || !_lastData->slice().equals(compareBuilder->slice())) { - LOG(DEBUG) << "Waiting done and nothing happended. Refetching to be sure"; + LOG_TOPIC(DEBUG, Logger::CLUSTER) + << "Waiting done and nothing happended. Refetching to be sure"; // mop: watches have not triggered during our sleep...recheck to be sure refetchAndUpdate(false); }