Merge pull request #1054 from bnamasivayam/master

Fix a minor bug in the RoleFitness Class.
This commit is contained in:
Evan Tschannen 2019-01-14 17:02:08 -08:00 committed by GitHub
commit 50e95e5ab9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -474,7 +474,7 @@ public:
bool operator < (RoleFitness const& r) const {
if (worstFit != r.worstFit) return worstFit < r.worstFit;
// FIXME: TLog recruitment process does not guarantee the best fit is not worsened.
if ((role != ProcessClass::TLog || role != ProcessClass::LogRouter) && bestFit != r.bestFit) return bestFit < r.bestFit;
if (role != ProcessClass::TLog && role != ProcessClass::LogRouter && bestFit != r.bestFit) return bestFit < r.bestFit;
return count > r.count;
}