dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4e9392d
)
objectcache: Make SqlBagOStuff::waitForSlaves() no-op without slaves
author
Aaron Schulz
<aschulz@wikimedia.org>
Tue, 30 Aug 2016 22:32:09 +0000
(15:32 -0700)
committer
Krinkle
<krinklemail@gmail.com>
Tue, 30 Aug 2016 22:47:04 +0000
(22:47 +0000)
Change-Id: Ibaa4745c18c6f4f66edb4c5f190196b575d3b738
includes/objectcache/SqlBagOStuff.php
patch
|
blob
|
history
diff --git
a/includes/objectcache/SqlBagOStuff.php
b/includes/objectcache/SqlBagOStuff.php
index
7a89991
..
73f8280
100644
(file)
--- a/
includes/objectcache/SqlBagOStuff.php
+++ b/
includes/objectcache/SqlBagOStuff.php
@@
-801,6
+801,10
@@
class SqlBagOStuff extends BagOStuff {
if ( $this->usesMainDB() ) {
$lb = $this->getSeparateMainLB()
?: MediaWikiServices::getInstance()->getDBLoadBalancer();
+ // Return if there are no slaves
+ if ( $lb->getServerCount() <= 1 ) {
+ return true;
+ }
// Main LB is used; wait for any slaves to catch up
try {
$pos = $lb->getMasterPos();