1
0
Fork 0

Wait with Inception gossip until maintenance mode is off.

This commit is contained in:
Max Neunhoeffer 2016-11-24 13:34:28 +01:00
parent 9a7f5af465
commit 4f23998bb9
1 changed files with 8 additions and 0 deletions

View File

@ -28,6 +28,7 @@
#include "Agency/MeasureCallback.h"
#include "Basics/ConditionLocker.h"
#include "Cluster/ClusterComm.h"
#include "GeneralServer/RestHandlerFactory.h"
#include <chrono>
#include <numeric>
@ -490,6 +491,13 @@ bool Inception::activeAgencyFromCommandLine() {
// @brief Thread main
void Inception::run() {
while (arangodb::rest::RestHandlerFactory::isMaintenance() &&
!this->isStopping() && !_agent->isStopping()) {
usleep(1000000);
LOG_TOPIC(DEBUG, Logger::AGENCY)
<< "Waiting for RestHandlerFactory to exit maintenance mode before we "
" start gossip protocol...";
}
// 1. If active agency, do as you're told
if (activeAgencyFromPersistence()) {