fix: do not commit more data after being stopped
fix: prioritize dc locality above exclusion to prevent being stuck after excluding all machines in a data center
This commit is contained in:
parent
37a6a81634
commit
e3c6b66240
|
@ -105,7 +105,7 @@ struct LeaderInfo {
|
|||
|
||||
// The first 7 bits of ChangeID represent cluster controller process class fitness, the lower the better
|
||||
void updateChangeID(ClusterControllerPriorityInfo info) {
|
||||
changeID = UID( ((uint64_t)info.isExcluded << 63) | ((uint64_t)info.dcFitness << 60) | ((uint64_t)info.processClassFitness << 57) | (changeID.first() & mask), changeID.second() );
|
||||
changeID = UID( ((uint64_t)info.processClassFitness << 57) | ((uint64_t)info.isExcluded << 60) | ((uint64_t)info.dcFitness << 61) | (changeID.first() & mask), changeID.second() );
|
||||
}
|
||||
|
||||
// All but the first 7 bits are used to represent process id
|
||||
|
|
|
@ -1241,7 +1241,7 @@ public:
|
|||
// Check if machine can be removed, if requested
|
||||
if ((kt == KillInstantly) || (kt == InjectFaults) || (kt == RebootAndDelete) || (kt == RebootProcessAndDelete))
|
||||
{
|
||||
std::vector<ProcessInfo*> processesLeft, processesDead;
|
||||
std::vector<ProcessInfo*> processesLeft, processesDead;
|
||||
int protectedWorker = 0, unavailable = 0, excluded = 0, cleared = 0;
|
||||
|
||||
for (auto machineRec : machines) {
|
||||
|
@ -1251,19 +1251,19 @@ public:
|
|||
// Do not include any excluded machines
|
||||
if (processInfo->isExcluded()) {
|
||||
processesDead.push_back(processInfo);
|
||||
excluded ++;
|
||||
excluded++;
|
||||
}
|
||||
else if (!processInfo->isCleared()) {
|
||||
processesDead.push_back(processInfo);
|
||||
cleared ++;
|
||||
cleared++;
|
||||
}
|
||||
else if (!processInfo->isAvailable()) {
|
||||
processesDead.push_back(processInfo);
|
||||
unavailable ++;
|
||||
unavailable++;
|
||||
}
|
||||
else if (protectedAddresses.count(processInfo->address)) {
|
||||
processesLeft.push_back(processInfo);
|
||||
protectedWorker ++;
|
||||
protectedWorker++;
|
||||
}
|
||||
else if (machineRec.second.zoneId != zoneId)
|
||||
processesLeft.push_back(processInfo);
|
||||
|
|
|
@ -1335,6 +1335,10 @@ ACTOR Future<Void> pullAsyncData( TLogData* self, Reference<LogData> logData, Ta
|
|||
}
|
||||
}
|
||||
|
||||
if(logData->stopped) {
|
||||
return Void();
|
||||
}
|
||||
|
||||
Version ver = 0;
|
||||
Arena arena;
|
||||
BinaryWriter wr(Unversioned());
|
||||
|
|
Loading…
Reference in New Issue