1
0
Fork 0

Merge branch 'devel' of github.com:arangodb/arangodb into devel

This commit is contained in:
Andreas Streichardt 2016-06-10 18:38:40 +02:00
commit e086199fa6
2 changed files with 5 additions and 7 deletions

View File

@ -297,8 +297,6 @@ JOB_STATUS MoveShard::status () {
if (foundFrom && foundTo) {
LOG(WARN) << _from << " " << current.toJson();
if (current[0].copyString() == _from) { // Leader
Builder underscore; // serverId -> _serverId

View File

@ -362,10 +362,11 @@ void Supervision::shrinkCluster () {
for (auto const& job : todos) {
try {
if (job.second->slice().get("type").copyString() == "cleanOutServer") {
if ((*job.second)("type").getString() == "cleanOutServer") {
return;
}
} catch (std::exception const& e) {
LOG(WARN) << job.second->slice().toJson();
LOG_TOPIC(WARN, Logger::AGENCY)
<< "Failed to get job type of job " << job.first << ": " << e.what();
return;
@ -374,7 +375,7 @@ void Supervision::shrinkCluster () {
for (auto const& job : pends) {
try {
if (job.second->slice().get("type").copyString() == "cleanOutServer") {
if ((*job.second)("type").getString() == "cleanOutServer") {
return;
}
} catch (std::exception const& e) {
@ -429,13 +430,12 @@ void Supervision::shrinkCluster () {
// Clean out as long as number of available servers is bigger
// than maxReplFactor and bigger than targeted number of db servers
while (availServers.size() > maxReplFact &&
availServers.size() > targetNumDBServers) {
if (availServers.size() > maxReplFact &&
availServers.size() > targetNumDBServers) {
// Schedule last server for cleanout
CleanOutServer(_snapshot, _agent, std::to_string(_jobId++),
"supervision", _agencyPrefix, availServers.back());
availServers.pop_back();
}
}