mirror of https://gitee.com/bigwinds/arangodb
fix cluster upgrade
This commit is contained in:
parent
fd18efa94e
commit
9dd164eadc
|
@ -143,6 +143,13 @@ bool ApplicationCluster::prepare () {
|
|||
ServerState::instance()->setDisableDispatcherFrontend(_disableDispatcherFrontend);
|
||||
ServerState::instance()->setDisableDispatcherKickstarter(_disableDispatcherKickstarter);
|
||||
|
||||
if (_disabled) {
|
||||
// if ApplicationFeature is disabled
|
||||
_enableCluster = false;
|
||||
ServerState::instance()->setRole(ServerState::ROLE_SINGLE);
|
||||
return true;
|
||||
}
|
||||
|
||||
// check the cluster state
|
||||
_enableCluster = ! _agencyEndpoints.empty();
|
||||
|
||||
|
|
|
@ -838,6 +838,9 @@ int ArangoServer::startupServer () {
|
|||
checkVersion = true;
|
||||
// --check-version disables all replication appliers
|
||||
_disableReplicationApplier = true;
|
||||
if (_applicationCluster != nullptr) {
|
||||
_applicationCluster->disable();
|
||||
}
|
||||
}
|
||||
|
||||
// run upgrade script
|
||||
|
@ -847,6 +850,9 @@ int ArangoServer::startupServer () {
|
|||
performUpgrade = true;
|
||||
// --upgrade disables all replication appliers
|
||||
_disableReplicationApplier = true;
|
||||
if (_applicationCluster != nullptr) {
|
||||
_applicationCluster->disable();
|
||||
}
|
||||
}
|
||||
|
||||
// skip an upgrade even if VERSION is missing
|
||||
|
|
Loading…
Reference in New Issue