/**
* Used by getDB() / setDB()
- * @var IDatabase
+ * @var Database
*/
private $mDb = null;
if ( is_array( $wgProfiler ) && isset( $wgProfiler['class'] ) ) {
$class = $wgProfiler['class'];
+ /** @var Profiler $profiler */
$profiler = new $class(
[ 'sampling' => 1, 'output' => [ $output ] ]
+ $wgProfiler
$this->beginTransaction( $dbw, __METHOD__ );
# Get "active" text records from the revisions table
+ $cur = [];
$this->output( 'Searching for active text records in revisions table...' );
$res = $dbw->select( 'revision', 'rev_text_id', [], __METHOD__, [ 'DISTINCT' ] );
foreach ( $res as $row ) {
/**
* Lock the search index
- * @param DatabaseBase &$db
+ * @param Database &$db
*/
private function lockSearchindex( $db ) {
$write = [ 'searchindex' ];
/**
* Unlock the tables
- * @param DatabaseBase &$db
+ * @param Database &$db
*/
private function unlockSearchindex( $db ) {
$db->unlockTables( __CLASS__ . '::' . __METHOD__ );
/**
* Unlock and lock again
* Since the lock is low-priority, queued reads will be able to complete
- * @param DatabaseBase &$db
+ * @param Database &$db
*/
private function relockSearchindex( $db ) {
$this->unlockSearchindex( $db );
* Perform a search index update with locking
* @param int $maxLockTime The maximum time to keep the search index locked.
* @param string $callback The function that will update the function.
- * @param DatabaseBase $dbw
+ * @param Database $dbw
* @param array $results
*/
public function updateSearchIndex( $maxLockTime, $callback, $dbw, $results ) {
/**
* Update the searchindex table for a given pageid
- * @param DatabaseBase $dbw A database write handle
+ * @param Database $dbw A database write handle
* @param int $pageId The page ID to update.
* @return null|string
*/