Since it calls LBFactory::commitAndWaitForReplication, blocking for
an unknown amount of time, it is a bit "heavyweight" to be the sort
of quick update that uses onTransactionIdle().
Change-Id: Ic3476de5b61a7cd5f31ba487b186f9605a3b2774
return;
}
- $dbw->onTransactionIdle(
+ DeferredUpdates::addUpdate( new AutoCommitUpdate(
+ $dbw,
+ __METHOD__,
function () use ( $dbw, $namespace, $dbkeys ) {
$services = MediaWikiServices::getInstance();
$lbFactory = $services->getDBLoadBalancerFactory();
);
$lbFactory->commitAndWaitForReplication( __METHOD__, $ticket );
}
- },
- __METHOD__
- );
+ }
+ ) );
}
}