Taueres has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/167047

Change subject: SqlBagOStuff: fix percentage in deleteObjectsExpiringBefore()
......................................................................

SqlBagOStuff: fix percentage in deleteObjectsExpiringBefore()

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
---
M includes/objectcache/SqlBagOStuff.php
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/47/167047/1

diff --git a/includes/objectcache/SqlBagOStuff.php 
b/includes/objectcache/SqlBagOStuff.php
index 3b0f816..d8d86db 100644
--- a/includes/objectcache/SqlBagOStuff.php
+++ b/includes/objectcache/SqlBagOStuff.php
@@ -621,7 +621,8 @@
                                                                if ( 
$remainingSeconds > $totalSeconds ) {
                                                                        
$totalSeconds = $remainingSeconds;
                                                                }
-                                                               $percent = ( $i 
+ $remainingSeconds / $totalSeconds )
+                                                               
$processedSeconds = $totalSeconds - $remainingSeconds;
+                                                               $percent = ( $i 
+ $processedSeconds / $totalSeconds )
                                                                        / 
$this->shards * 100;
                                                        }
                                                        $percent = ( $percent / 
$this->numServers )

-- 
To view, visit https://gerrit.wikimedia.org/r/167047
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic745f6e8375a85da543de36703fad6d31f62ea90
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Taueres <santoro....@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to