mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'devel' of https://github.com/arangodb/arangodb into devel
This commit is contained in:
commit
76b9393211
|
@ -178,13 +178,13 @@ void HeartbeatThread::runDBServer() {
|
||||||
auto currentAgencyCallback = std::make_shared<AgencyCallback>(
|
auto currentAgencyCallback = std::make_shared<AgencyCallback>(
|
||||||
_agency, "Current/Version", updateCurrent, true);
|
_agency, "Current/Version", updateCurrent, true);
|
||||||
|
|
||||||
registered = false;
|
registered = true;
|
||||||
while (!registered) {
|
while (!registered) {
|
||||||
registered = _agencyCallbackRegistry->registerCallback(currentAgencyCallback);
|
//registered = _agencyCallbackRegistry->registerCallback(currentAgencyCallback);
|
||||||
if (!registered) {
|
//if (!registered) {
|
||||||
LOG(ERR) << "Couldn't register current change in agency!";
|
// LOG(ERR) << "Couldn't register current change in agency!";
|
||||||
sleep(1);
|
// sleep(1);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
while (!isStopping()) {
|
while (!isStopping()) {
|
||||||
|
@ -232,7 +232,7 @@ void HeartbeatThread::runDBServer() {
|
||||||
if (!wasNotified) {
|
if (!wasNotified) {
|
||||||
LOG(TRACE) << "Lock reached timeout";
|
LOG(TRACE) << "Lock reached timeout";
|
||||||
planAgencyCallback->refetchAndUpdate();
|
planAgencyCallback->refetchAndUpdate();
|
||||||
currentAgencyCallback->refetchAndUpdate();
|
//currentAgencyCallback->refetchAndUpdate();
|
||||||
} else {
|
} else {
|
||||||
// mop: a plan change returned successfully...
|
// mop: a plan change returned successfully...
|
||||||
// recheck and redispatch in case our desired versions increased
|
// recheck and redispatch in case our desired versions increased
|
||||||
|
@ -244,7 +244,7 @@ void HeartbeatThread::runDBServer() {
|
||||||
}
|
}
|
||||||
|
|
||||||
_agencyCallbackRegistry->unregisterCallback(planAgencyCallback);
|
_agencyCallbackRegistry->unregisterCallback(planAgencyCallback);
|
||||||
_agencyCallbackRegistry->unregisterCallback(currentAgencyCallback);
|
//_agencyCallbackRegistry->unregisterCallback(currentAgencyCallback);
|
||||||
int count = 0;
|
int count = 0;
|
||||||
while (++count < 3000) {
|
while (++count < 3000) {
|
||||||
bool isInPlanChange;
|
bool isInPlanChange;
|
||||||
|
|
|
@ -393,10 +393,10 @@ function createLocalDatabases (plannedDatabases, writeLocked) {
|
||||||
payload.errorNum = err.errorNum;
|
payload.errorNum = err.errorNum;
|
||||||
payload.errorMessage = err.errorMessage;
|
payload.errorMessage = err.errorMessage;
|
||||||
}
|
}
|
||||||
writeLocked({ part: "Current" },
|
|
||||||
createDatabaseAgency,
|
|
||||||
[ payload ]);
|
|
||||||
}
|
}
|
||||||
|
writeLocked({ part: "Current" },
|
||||||
|
createDatabaseAgency,
|
||||||
|
[ payload ]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue