mirror of https://gitee.com/bigwinds/arangodb
looks good for dangling creation of shards
This commit is contained in:
parent
f0023d70e1
commit
f066ff9920
|
@ -355,6 +355,18 @@ bool CleanOutServer::checkFeasibility () {
|
|||
}
|
||||
}
|
||||
|
||||
// Server has not been cleaned already
|
||||
if (_snapshot.exists("/Target/FailedServers").size() == 2) {
|
||||
for (auto const& srv :
|
||||
VPackArrayIterator(_snapshot("/Failed/CleanedServers").slice())) {
|
||||
if (srv.copyString() == _server) {
|
||||
LOG_TOPIC(ERR, Logger::AGENCY)
|
||||
<< _server << " has been cleaned out already!";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (_snapshot.exists(serverStatePrefix + _server + "/cleaning").size() == 4) {
|
||||
LOG_TOPIC(ERR, Logger::AGENCY)
|
||||
<< _server << " has been cleaned out already!";
|
||||
|
@ -431,3 +443,4 @@ bool CleanOutServer::checkFeasibility () {
|
|||
return true;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -167,7 +167,8 @@ bool FailedServer::start() {
|
|||
for (auto const& shard : collection("shards").children()) {
|
||||
UnassumedLeadership(
|
||||
_snapshot, _agent, _jobId + "-" + std::to_string(sub++), _jobId,
|
||||
_agencyPrefix, database.first, collptr.first, shard.first);
|
||||
_agencyPrefix, database.first, collptr.first, shard.first,
|
||||
_server);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue