- try {
- $lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
- $lbFactory->waitForReplication(
- [ 'timeout' => 30, 'ifWritesSince' => $this->lastReplicationWait ]
- );
- $this->lastReplicationWait = microtime( true );
-
- return true;
- } catch ( DBReplicationWaitError $e ) {
- return false;
- }
+ $lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
+ $waitSucceeded = $lbFactory->waitForReplication(
+ [ 'timeout' => 30, 'ifWritesSince' => $this->lastReplicationWait ]
+ );
+ $this->lastReplicationWait = microtime( true );
+ return $waitSucceeded;