Skip to content

Commit

Permalink
Only add treeBuildProgress in one place
Browse files Browse the repository at this point in the history
  • Loading branch information
burqen authored and tinwelint committed Mar 6, 2019
1 parent 87308af commit 6531f65
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -559,15 +559,17 @@ public PopulationProgress progress( PopulationProgress scanProgress )
}

// Add tree building incl. external updates
PopulationProgress treeBuildProgress;
if ( allScanUpdates.stream().allMatch( part -> part.mergeStarted ) )
{
long entryCount = allScanUpdates.stream().mapToLong( part -> part.count ).sum() + externalUpdates.count();
builder.add( PopulationProgress.single( numberOfAppliedScanUpdates + numberOfAppliedExternalUpdates, entryCount ), 2 );
treeBuildProgress = PopulationProgress.single( numberOfAppliedScanUpdates + numberOfAppliedExternalUpdates, entryCount );
}
else
{
builder.add( PopulationProgress.NONE, 2 );
treeBuildProgress = PopulationProgress.NONE;
}
builder.add( treeBuildProgress, 2 );

return builder.build();
}
Expand Down

0 comments on commit 6531f65

Please sign in to comment.