X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Flibs%2Frdbms%2Flbfactory%2FLBFactory.php;h=e736ab9cc7dc98f6e5fb66f873cdf1f7f2c32e81;hp=be1a8511dc359b107f3a3d278dfa24726894daa8;hb=4df0c71911500466a6330b8fe29c623ef5b51e41;hpb=35f00337816ed66a7ca8bb6eeb5fccf422ee4e1a diff --git a/includes/libs/rdbms/lbfactory/LBFactory.php b/includes/libs/rdbms/lbfactory/LBFactory.php index be1a8511dc..e736ab9cc7 100644 --- a/includes/libs/rdbms/lbfactory/LBFactory.php +++ b/includes/libs/rdbms/lbfactory/LBFactory.php @@ -375,7 +375,7 @@ abstract class LBFactory implements ILBFactory { $opts += [ 'domain' => false, 'cluster' => false, - 'timeout' => $this->cliMode ? 60 : 10, + 'timeout' => $this->cliMode ? 60 : 1, 'ifWritesSince' => null ]; @@ -432,13 +432,7 @@ abstract class LBFactory implements ILBFactory { } } - if ( $failed ) { - throw new DBReplicationWaitError( - null, - "Could not wait for replica DBs to catch up to " . - implode( ', ', $failed ) - ); - } + return !$failed; } public function setWaitForReplicationListener( $name, callable $callback = null ) { @@ -478,12 +472,13 @@ abstract class LBFactory implements ILBFactory { } $this->commitMasterChanges( $fnameEffective ); - $this->waitForReplication( $opts ); + $waitSucceeded = $this->waitForReplication( $opts ); // If a nested caller committed on behalf of $fname, start another empty $fname // transaction, leaving the caller with the same empty transaction state as before. if ( $fnameEffective !== $fname ) { $this->beginMasterChanges( $fnameEffective ); } + return $waitSucceeded; } public function getChronologyProtectorTouched( $dbName ) {