mirror of
https://github.com/apple/foundationdb.git
synced 2025-05-18 12:10:00 +08:00
Better master exists should not trigger if it will lower the total number of processes being recruited
This commit is contained in:
parent
6bed45fc6d
commit
10fd094920
@ -1567,11 +1567,17 @@ public:
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (oldTLogFit.count + oldInFit.proxy.count + oldInFit.grvProxy.count + oldInFit.resolver.count >
|
||||||
|
newTLogFit.count + newInFit.proxy.count + newInFit.grvProxy.count + newInFit.resolver.count) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// Check backup worker fitness
|
// Check backup worker fitness
|
||||||
RoleFitness oldBackupWorkersFit(backup_workers, ProcessClass::Backup);
|
RoleFitness oldBackupWorkersFit(backup_workers, ProcessClass::Backup);
|
||||||
const int nBackup = backup_addresses.size();
|
const int nBackup = backup_addresses.size();
|
||||||
RoleFitness newBackupWorkersFit(
|
RoleFitness newBackupWorkersFit(
|
||||||
getWorkersForRoleInDatacenter(clusterControllerDcId, ProcessClass::Backup, nBackup, db.config, id_used),
|
getWorkersForRoleInDatacenter(
|
||||||
|
clusterControllerDcId, ProcessClass::Backup, nBackup, db.config, id_used, true),
|
||||||
ProcessClass::Backup);
|
ProcessClass::Backup);
|
||||||
|
|
||||||
if (oldTLogFit > newTLogFit || oldInFit > newInFit || oldSatelliteTLogFit > newSatelliteTLogFit ||
|
if (oldTLogFit > newTLogFit || oldInFit > newInFit || oldSatelliteTLogFit > newSatelliteTLogFit ||
|
||||||
|
Loading…
x
Reference in New Issue
Block a user