public $replicaId = false;
public $noCount = false;
public $debugLog, $infoLog, $criticalLog;
+ /** @var ExternalStoreDB */
public $store;
private static $optionsWithArgs = [
foreach ( $options as $name => $value ) {
$this->$name = $value;
}
- $this->store = new ExternalStoreDB;
+ $esFactory = MediaWikiServices::getInstance()->getExternalStoreFactory();
+ $this->store = $esFactory->getStore( 'DB' );
if ( !$this->isChild ) {
$GLOBALS['wgDebugLogPrefix'] = "RCT M: ";
} elseif ( $this->replicaId !== false ) {
* Dispatch a command to the next available replica DB.
* This may block until a replica DB finishes its work and becomes available.
*/
- function dispatch( /*...*/ ) {
- $args = func_get_args();
+ function dispatch( ...$args ) {
$pipes = $this->replicaPipes;
$x = [];
$y = [];