protected function mergeViaCas( $key, $callback, $exptime = 0, $attempts = 10 ) {
do {
$this->clearLastError();
+ $reportDupes = $this->reportDupes;
+ $this->reportDupes = false;
$casToken = null; // passed by reference
$currentValue = $this->getWithToken( $key, $casToken, self::READ_LATEST );
+ $this->reportDupes = $reportDupes;
+
if ( $this->getLastError() ) {
return false; // don't spam retries (retry only on races)
}
}
$this->clearLastError();
+ $reportDupes = $this->reportDupes;
+ $this->reportDupes = false;
$currentValue = $this->get( $key, self::READ_LATEST );
+ $this->reportDupes = $reportDupes;
+
if ( $this->getLastError() ) {
$success = false;
} else {