From: Tim Starling Date: Sat, 10 Jun 2017 10:54:23 +0000 (+1000) Subject: Fix SqlBagOStuff exptime uniqueness assumption X-Git-Tag: 1.31.0-rc.0~3022^2 X-Git-Url: http://git.cyclocoop.org/%22.%24redirect_annul.%22?a=commitdiff_plain;h=fb91d409d659efa27eab8c41850201e7a9f13c07;p=lhc%2Fweb%2Fwiklou.git Fix SqlBagOStuff exptime uniqueness assumption The WMF parser cache tables have some 30000 rows with an identical, old expiry time. So each time deleteObjectsExpiringBefore() is run, the first batch on each table is correct, but the keys for the second batch are selected with exptime > X, where X is shared exptime of the many old rows. So, use exptime >= X instead. Change-Id: I6853f64f88f65d4529be2a42c9ed70cfa62cf653 --- diff --git a/includes/objectcache/SqlBagOStuff.php b/includes/objectcache/SqlBagOStuff.php index a4a6ba845a..6c103017d0 100644 --- a/includes/objectcache/SqlBagOStuff.php +++ b/includes/objectcache/SqlBagOStuff.php @@ -588,7 +588,7 @@ class SqlBagOStuff extends BagOStuff { while ( true ) { $conds = $baseConds; if ( $maxExpTime !== false ) { - $conds[] = 'exptime > ' . $db->addQuotes( $maxExpTime ); + $conds[] = 'exptime >= ' . $db->addQuotes( $maxExpTime ); } $rows = $db->select( $this->getTableNameByShard( $i ),