This simply moves the call order down a bit.
Change-Id: I78559f769133d5addb590a65af7d535604de8407
'ifWritesSince' => null
];
'ifWritesSince' => null
];
- foreach ( $this->replicationWaitCallbacks as $callback ) {
- $callback();
- }
-
// Figure out which clusters need to be checked
/** @var LoadBalancer[] $lbs */
$lbs = [];
// Figure out which clusters need to be checked
/** @var LoadBalancer[] $lbs */
$lbs = [];
$masterPositions[$i] = $lb->getMasterPos();
}
$masterPositions[$i] = $lb->getMasterPos();
}
+ // Run any listener callbacks *after* getting the DB positions. The more
+ // time spent in the callbacks, the less time is spent in waitForAll().
+ foreach ( $this->replicationWaitCallbacks as $callback ) {
+ $callback();
+ }
+
$failed = [];
foreach ( $lbs as $i => $lb ) {
if ( $masterPositions[$i] ) {
$failed = [];
foreach ( $lbs as $i => $lb ) {
if ( $masterPositions[$i] ) {