Merge "Tweaked BagOStuff::lock() retry times slightly to be faster"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Fri, 30 Jan 2015 21:02:14 +0000 (21:02 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 30 Jan 2015 21:02:14 +0000 (21:02 +0000)
includes/objectcache/BagOStuff.php

index 0a23446..85b0b62 100644 (file)
@@ -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;