Partial deletion percentage progess was computed using
$remainingSeconds. This is incorrect since $remainingSeconds
is going to *decrease* ( instead of increase ) while the
process continues.
The correct implementation uses 'processed seconds' instead.
Change-Id: Ic745f6e8375a85da543de36703fad6d31f62ea90
if ( $remainingSeconds > $totalSeconds ) {
$totalSeconds = $remainingSeconds;
}
- $percent = ( $i + $remainingSeconds / $totalSeconds )
+ $processedSeconds = $totalSeconds - $remainingSeconds;
+ $percent = ( $i + $processedSeconds / $totalSeconds )
/ $this->shards * 100;
}
$percent = ( $percent / $this->numServers )