From: Aaron Schulz Date: Wed, 14 Jan 2015 19:54:38 +0000 (-0800) Subject: Tweaked BagOStuff::lock() retry times slightly to be faster X-Git-Tag: 1.31.0-rc.0~12542^2 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/fiche.php?a=commitdiff_plain;h=24c970667e0abb6012ce0b580cf8707145513d79;p=lhc%2Fweb%2Fwiklou.git Tweaked BagOStuff::lock() retry times slightly to be faster Change-Id: Id04e373dcd2ed57951b68432fcd7491f4288b028 --- diff --git a/includes/objectcache/BagOStuff.php b/includes/objectcache/BagOStuff.php index 0a2344688b..85b0b62087 100644 --- a/includes/objectcache/BagOStuff.php +++ b/includes/objectcache/BagOStuff.php @@ -192,7 +192,7 @@ abstract class BagOStuff { $locked = false; // lock acquired $attempts = 0; // failed attempts do { - if ( ++$attempts >= 3 && $sleep <= 1e6 ) { + if ( ++$attempts >= 3 && $sleep <= 5e5 ) { // Exponentially back off after failed attempts to avoid network spam. // About 2*$uRTT*(2^n-1) us of "sleep" happen for the next n attempts. $sleep *= 2;