mirror of https://gitee.com/bigwinds/arangodb
fixed erroneous break of supervision agency updates
This commit is contained in:
parent
926282ac46
commit
cf09546d93
|
@ -54,7 +54,7 @@ FailedServer::~FailedServer() {}
|
|||
|
||||
bool FailedServer::start() {
|
||||
LOG_TOPIC(INFO, Logger::AGENCY)
|
||||
<< "Trying to start FailedLeader job" + _jobId + " for server " + _server;
|
||||
<< "Trying to start FailedServer job" + _jobId + " for server " + _server;
|
||||
|
||||
// Copy todo to pending
|
||||
Builder todo, pending;
|
||||
|
@ -118,7 +118,7 @@ bool FailedServer::start() {
|
|||
|
||||
if (res.accepted && res.indices.size() == 1 && res.indices[0]) {
|
||||
LOG_TOPIC(INFO, Logger::AGENCY)
|
||||
<< "Pending: DB Server " + _server + " failed.";
|
||||
<< "Pending job for failed DB Server " << _server;
|
||||
|
||||
auto const& databases = _snapshot("/Plan/Collections").children();
|
||||
auto const& current = _snapshot("/Current/Collections").children();
|
||||
|
@ -130,19 +130,19 @@ bool FailedServer::start() {
|
|||
|
||||
for (auto const& collptr : database.second->children()) {
|
||||
Node const& collection = *(collptr.second);
|
||||
|
||||
|
||||
if (!cdatabase.find(collptr.first)->second->children().empty()) {
|
||||
Node const& collection = *(collptr.second);
|
||||
Node const& replicationFactor = collection("replicationFactor");
|
||||
if (replicationFactor.slice().getUInt() > 1) {
|
||||
for (auto const& shard : collection("shards").children()) {
|
||||
VPackArrayIterator dbsit(shard.second->slice());
|
||||
|
||||
|
||||
// Only proceed if leader and create job
|
||||
if ((*dbsit.begin()).copyString() != _server) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
FailedLeader(
|
||||
_snapshot, _agent, _jobId + "-" + std::to_string(sub++),
|
||||
_jobId, _agencyPrefix, database.first, collptr.first,
|
||||
|
|
|
@ -50,7 +50,7 @@ Supervision::Supervision()
|
|||
_agent(nullptr),
|
||||
_snapshot("Supervision"),
|
||||
_frequency(5),
|
||||
_gracePeriod(120),
|
||||
_gracePeriod(15),
|
||||
_jobId(0),
|
||||
_jobIdMax(0),
|
||||
_selfShutdown(false) {}
|
||||
|
|
|
@ -81,7 +81,6 @@ function SynchronousReplicationSuite () {
|
|||
console.info("Replication up and running!");
|
||||
return true;
|
||||
}
|
||||
require('internal').print("Plan:", cinfo.shards, "Current:", ccinfo.map(s => s.servers));
|
||||
console.info("Plan:", cinfo.shards, "Current:", ccinfo.map(s => s.servers));
|
||||
wait(0.5);
|
||||
global.ArangoClusterInfo.flush();
|
||||
|
@ -299,14 +298,14 @@ function SynchronousReplicationSuite () {
|
|||
c.remove([ids[0]._key, ids[1]._key]);
|
||||
|
||||
if (healing.place === 17) { healFailure(healing); }
|
||||
/* if (failure.place === 18) { makeFailure(failure); }
|
||||
if (failure.place === 18) { makeFailure(failure); }
|
||||
|
||||
docs = c.document([ids[0]._key, ids[1]._key]);
|
||||
assertEqual(2, docs.length);
|
||||
assertTrue(docs[0].error);
|
||||
assertTrue(docs[1].error);
|
||||
|
||||
if (healing.place === 18) { healFailure(healing); }*/
|
||||
if (healing.place === 18) { healFailure(healing); }
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Reference in New Issue