Merge "SqlBagOStuff: fix percentage in deleteObjectsExpiringBefore()"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 21 Oct 2014 00:58:08 +0000 (00:58 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 21 Oct 2014 00:58:08 +0000 (00:58 +0000)
includes/objectcache/SqlBagOStuff.php

index 3b0f816..d8d86db 100644 (file)
@@ -621,7 +621,8 @@ class SqlBagOStuff extends BagOStuff {
                                                                if ( $remainingSeconds > $totalSeconds ) {
                                                                        $totalSeconds = $remainingSeconds;
                                                                }
-                                                               $percent = ( $i + $remainingSeconds / $totalSeconds )
+                                                               $processedSeconds = $totalSeconds - $remainingSeconds;
+                                                               $percent = ( $i + $processedSeconds / $totalSeconds )
                                                                        / $this->shards * 100;
                                                        }
                                                        $percent = ( $percent / $this->numServers )