mirror of https://gitee.com/bigwinds/arangodb
Wait with Inception gossip until maintenance mode is off.
This commit is contained in:
parent
9a7f5af465
commit
4f23998bb9
|
@ -28,6 +28,7 @@
|
||||||
#include "Agency/MeasureCallback.h"
|
#include "Agency/MeasureCallback.h"
|
||||||
#include "Basics/ConditionLocker.h"
|
#include "Basics/ConditionLocker.h"
|
||||||
#include "Cluster/ClusterComm.h"
|
#include "Cluster/ClusterComm.h"
|
||||||
|
#include "GeneralServer/RestHandlerFactory.h"
|
||||||
|
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <numeric>
|
#include <numeric>
|
||||||
|
@ -490,6 +491,13 @@ bool Inception::activeAgencyFromCommandLine() {
|
||||||
|
|
||||||
// @brief Thread main
|
// @brief Thread main
|
||||||
void Inception::run() {
|
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
|
// 1. If active agency, do as you're told
|
||||||
if (activeAgencyFromPersistence()) {
|
if (activeAgencyFromPersistence()) {
|
||||||
|
|
Loading…
Reference in New Issue