mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'sharding' of ssh://github.com/triAGENS/ArangoDB into sharding
This commit is contained in:
commit
2465a1d870
|
@ -401,8 +401,18 @@ void ApplicationCluster::stop () {
|
|||
|
||||
{
|
||||
AgencyCommLocker locker("Current", "WRITE");
|
||||
|
||||
|
||||
if (locker.successful()) {
|
||||
// unregister ourselves
|
||||
ServerState::RoleEnum role = ServerState::instance()->getRole();
|
||||
|
||||
if (role == ServerState::ROLE_PRIMARY) {
|
||||
comm.removeValues("Current/DBServers/" + _myId, false);
|
||||
}
|
||||
else if (role == ServerState::ROLE_COORDINATOR) {
|
||||
comm.removeValues("Current/Coordinators/" + _myId, false);
|
||||
}
|
||||
|
||||
// unregister ourselves
|
||||
comm.removeValues("Current/ServersRegistered/" + _myId, false);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue