Merge "Avoid Sizzle's :first/:last selectors. Use $.first()/$.last()"
[lhc/web/wiklou.git] / includes / jobqueue / JobRunner.php
index 39b5b3b..454f694 100644 (file)
@@ -290,8 +290,6 @@ class JobRunner implements LoggerAwareInterface {
                        $status = $job->run();
                        $error = $job->getLastError();
                        $this->commitMasterChanges( $lbFactory, $job, $fnameTrxOwner );
-                       // Important: this must be the last deferred update added (T100085, T154425)
-                       DeferredUpdates::addCallableUpdate( [ JobQueueGroup::class, 'pushLazyJobs' ] );
                        // Run any deferred update tasks; doUpdates() manages transactions itself
                        DeferredUpdates::doUpdates();
                } catch ( Exception $e ) {
@@ -537,7 +535,7 @@ class JobRunner implements LoggerAwareInterface {
 
                $time = false;
                $lb = $lbFactory->getMainLB();
-               if ( $syncThreshold !== false && $lb->getServerCount() > 1 ) {
+               if ( $syncThreshold !== false && $lb->hasStreamingReplicaServers() ) {
                        // Generally, there is one master connection to the local DB
                        $dbwSerial = $lb->getAnyOpenConnection( $lb->getWriterIndex() );
                        // We need natively blocking fast locks