1
0
Fork 0

always load agency data, regardless of startup mode

This commit is contained in:
jsteemann 2016-04-13 12:20:24 +02:00
parent 74b70bf60f
commit 96d96ca977
1 changed files with 7 additions and 5 deletions

View File

@ -1662,6 +1662,11 @@ int ArangoServer::startupServer() {
FATAL_ERROR_EXIT();
}
}
// Loading ageny's persistent state
if(_applicationAgency->agent() != nullptr) {
_applicationAgency->agent()->load();
}
if (_disableAuthentication) {
LOG(INFO) << "Authentication is turned off";
@ -1815,15 +1820,12 @@ void ArangoServer::waitForHeartbeat() {
////////////////////////////////////////////////////////////////////////////////
/// @brief runs the server
////////////////////////////////////////////////////////////////////////////////
int ArangoServer::runServer(TRI_vocbase_t* vocbase) {
// disabled maintenance mode
// disable maintenance mode
waitForHeartbeat();
HttpHandlerFactory::setMaintenance(false);
// Loading ageny's persistent state
if(_applicationAgency->agent()!=nullptr)
_applicationAgency->agent()->load();
// just wait until we are signalled
_applicationServer->wait();