Merge pull request #4454 from vishesh/task/tlog-rf-old-tlog
status: Ignore LogSets with no tLogs when computing FT
This commit is contained in:
commit
bff7b9dcae
|
@ -2230,6 +2230,13 @@ static JsonBuilderObject tlogFetcher(int* logFaultTolerance,
|
|||
int localSetsWithNonNegativeFaultTolerance = 0;
|
||||
|
||||
for (int i = 0; i < tLogs.size(); i++) {
|
||||
if (tLogs[i].tLogs.size() == 0) {
|
||||
// We can have LogSets where there are no tLogs but some LogRouters. It's the way
|
||||
// recruiting is implemented for old LogRouters in TagPartitionedLogSystem, where
|
||||
// it adds an empty LogSet for missing locality.
|
||||
continue;
|
||||
}
|
||||
|
||||
int failedLogs = 0;
|
||||
for (auto& log : tLogs[i].tLogs) {
|
||||
JsonBuilderObject logObj;
|
||||
|
@ -2246,6 +2253,7 @@ static JsonBuilderObject tlogFetcher(int* logFaultTolerance,
|
|||
}
|
||||
|
||||
if (tLogs[i].isLocal) {
|
||||
ASSERT_WE_THINK(tLogs[i].tLogReplicationFactor > 0);
|
||||
int currentFaultTolerance = tLogs[i].tLogReplicationFactor - 1 - tLogs[i].tLogWriteAntiQuorum - failedLogs;
|
||||
if (currentFaultTolerance >= 0) {
|
||||
localSetsWithNonNegativeFaultTolerance++;
|
||||
|
|
Loading…
Reference in New Issue