rdbms: disable ChronologyProtector if EmptyBagOStuff is used
authorAaron Schulz <aschulz@wikimedia.org>
Thu, 14 Jun 2018 00:14:23 +0000 (17:14 -0700)
committerBrian Wolff <bawolff+wn@gmail.com>
Thu, 19 Jul 2018 19:32:41 +0000 (19:32 +0000)
Bug: T197206
Change-Id: Ic07634224fac1ae72d1ba20176c028fdda5ba415

RELEASE-NOTES-1.31
includes/libs/rdbms/lbfactory/LBFactory.php

index 7872403..a67aca0 100644 (file)
@@ -13,6 +13,7 @@ This is a security and maintenance release of the MediaWiki 1.31 branch.
 * (T193829) Indicate when a Bot Password needs reset.
 * (T198037) GitInfo: Don't try shelling out if it's disabled.
 * (T151415) Log email changes.
+* (T197206) Fix performance regression when multiple DB used without caching.
 
 == MediaWiki 1.31 ==
 
index c272147..401e9b3 100644 (file)
@@ -466,6 +466,10 @@ abstract class LBFactory implements ILBFactory {
                        // Request opted out of using position wait logic. This is useful for requests
                        // done by the job queue or background ETL that do not have a meaningful session.
                        $this->chronProt->setWaitEnabled( false );
+               } elseif ( $this->memStash instanceof EmptyBagOStuff ) {
+                       // No where to store any DB positions and wait for them to appear
+                       $this->chronProt->setEnabled( false );
+                       $this->replLogger->info( 'Cannot use ChronologyProtector with EmptyBagOStuff.' );
                }
 
                $this->replLogger->debug( __METHOD__ . ': using request info ' .