rdbms: disable ChronologyProtector if EmptyBagOStuff is used
authorAaron Schulz <aschulz@wikimedia.org>
Thu, 14 Jun 2018 00:14:23 +0000 (17:14 -0700)
committerAddshore <addshorewiki@gmail.com>
Thu, 14 Jun 2018 06:57:31 +0000 (06:57 +0000)
Bug: T197206
Change-Id: Ic07634224fac1ae72d1ba20176c028fdda5ba415

includes/libs/rdbms/lbfactory/LBFactory.php

index 130a097..ff296c4 100644 (file)
@@ -505,6 +505,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 ' .