Page MenuHomePhabricator

maintenance/updateSearchIndex.php gives Error: 1100 Table 'page_restrictions' was not locked with LOCK TABLES
Closed, ResolvedPublic

Description

It seems updateSearchIndex.php is broken. The "same" bug was reported in T42302 but on a different table. When adding page_restrictions to the lockSearchindex function in Maintenance.php it seems to work.

	/**
	 * Lock the search index
	 * @param &$db DatabaseBase object
	 */
	private function lockSearchindex( &$db ) {
		$write = array( 'searchindex' );
		$read = array( 'page', 'revision', 'text', 'interwiki', 'l10n_cache', 'user', 'page_restrictions' );
		$db->lockTables( $read, $write, __CLASS__ . '::' . __METHOD__ );
	}

But then the script ends with the below message which seems to mean that something else is not working.

   --- Unlocking --
Done
*** Couldn't write to the searchUpdate.newwikidb.pos!

This was tested on a clean MW-1.23.7 & MW-1.24.1 install but I found out on our production wiki running MW-1.22.5.

Event Timeline

Jongfeli created this task.Jan 8 2015, 12:20 PM
Jongfeli updated the task description. (Show Details)
Jongfeli raised the priority of this task from to Needs Triage.
Jongfeli added a subscriber: Jongfeli.
Jongfeli updated the task description. (Show Details)Jan 8 2015, 12:24 PM
Jongfeli set Security to None.
Aklapper triaged this task as Low priority.Jan 8 2015, 10:40 PM

Change 192710 had a related patch set uploaded (by Physikerwelt):
Add page_restrictions to readlock in lockSearchindex

https://gerrit.wikimedia.org/r/192710

Change 192710 merged by jenkins-bot:
Add page_restrictions to readlock in lockSearchindex

https://gerrit.wikimedia.org/r/192710

Change 219491 had a related patch set uploaded (by Lewis Cawte):
Add page_restrictions to readlock in lockSearchindex

https://gerrit.wikimedia.org/r/219491

lcawte added a project: MW-1.25-release.EditedJun 19 2015, 11:07 PM
lcawte added a subscriber: lcawte.

Issue present in 1.25.1.

Change 219491 merged by jenkins-bot:
Add page_restrictions to readlock in lockSearchindex

https://gerrit.wikimedia.org/r/219491

Umherirrender closed this task as Resolved.Sep 27 2015, 7:08 PM
Umherirrender claimed this task.
alex-mashin added a subscriber: alex-mashin.EditedJan 5 2017, 6:57 PM

Issue present under MW 1.28 (table user_properties).