https://bugzilla.wikimedia.org/show_bug.cgi?id=42716
Web browser: ---
Bug ID: 42716
Summary: updater fails if db tables missing but entities
already present.
Product: MediaWiki extensions
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: WikidataRepo
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected],
[email protected]
Classification: Unclassified
Mobile Platform: ---
The updater fails if the wb_terms table is missing, but there are already
entities stored on some wiki pages. The reason is that
SqlStore::doSchemaUpdates will (correctly) register Wikibase.sql for execution
if wb_tables is missing, but then calls SqlStore::rebuild() before Wikibase.sql
actually got executed. This causes rebuild() to fail, because the tables that
it's trying to populate are not there yet.
This is triggered by a rare edge case - usually, the database tables will be
present if there are already entities (creating entities would be impossible
without them). So the state that triggers this error can only be the result of
tempering or failure in the database (in my case: a result of trying to debug
the updater itself).
The solution would be to wrap SqlStore::rebuild() in a maintenance script (we
need that anyway) and register it for later execution, instead of executing it
right away.
--
You are receiving this mail because:
You are on the CC list for the bug.
You are watching all bug changes.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l