From: Aaron Schulz Date: Thu, 28 Mar 2019 02:11:17 +0000 (-0700) Subject: objectcache: remove some unneeded code from BagOStuff::mergeViaCas X-Git-Tag: 1.34.0-rc.0~2280^2 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/journal.php?a=commitdiff_plain;h=62b8db6ea5989cdb8cbae170aeb120c7421193ca;p=lhc%2Fweb%2Fwiklou.git objectcache: remove some unneeded code from BagOStuff::mergeViaCas Change-Id: Ib92090fe4e1b1eb2c4f9e031f8476b24189392c8 --- diff --git a/includes/libs/objectcache/BagOStuff.php b/includes/libs/objectcache/BagOStuff.php index 5669366595..0dd7b57c6d 100644 --- a/includes/libs/objectcache/BagOStuff.php +++ b/includes/libs/objectcache/BagOStuff.php @@ -288,13 +288,10 @@ abstract class BagOStuff implements IExpiringStore, LoggerAwareInterface { */ protected function mergeViaCas( $key, $callback, $exptime = 0, $attempts = 10, $flags = 0 ) { do { - $this->clearLastError(); - $reportDupes = $this->reportDupes; - $this->reportDupes = false; $casToken = null; // passed by reference + // Get the old value and CAS token from cache + $this->clearLastError(); $currentValue = $this->doGet( $key, self::READ_LATEST, $casToken ); - $this->reportDupes = $reportDupes; - if ( $this->getLastError() ) { $this->logger->warning( __METHOD__ . ' failed due to I/O error on get() for {key}.',