MediaWiki master
LocalSerialProvider.php
Go to the documentation of this file.
1<?php
2
4
6
22 public function __construct(
23 array $config,
24 private readonly ILBFactory $lbf,
25 ) {
26 parent::__construct( $config );
27 }
28
30 protected function getDB() {
31 // So that startAtomic() will start a commit, reducing lock time.
32 // Without this flag, the transaction will be open until the start
33 // of request shutdown. This could be omitted to reduce the
34 // connection overhead, with numShards tuned upwards to compensate.
35 return $this->lbf->getAutoCommitPrimaryConnection();
36 }
37
39 protected function getTableName() {
40 return 'user_autocreate_serial';
41 }
42}
Base class for serial acquisition code shared between core and CentralAuth.
A serial provider which allocates IDs from the local database, or from a shared database if $wgShared...
__construct(array $config, private readonly ILBFactory $lbf,)
Manager of ILoadBalancer objects and, indirectly, IDatabase connections.