PropertyInfoTableBuilder uses wb_entity_per_page to list all properties. This can be done using the page table instead, based on the namespace defiend by PRopertyHandler.
Description
Details
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Drop use of entity_per_page from PropertyInfoTableBuilder | mediawiki/extensions/Wikibase | master | +43 -94 |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Open | None | T30599 Deadlock tracking bug (tracking) | |||
Resolved | hoo | T111535 Wikibase\Repo\Store\SQL\EntityPerPageTable::{closure} creating high number of deadlocks | |||
Declined | None | T51982 Add missing wb_entity_per_page entries on LinksUpdate | |||
Invalid | Lydia_Pintscher | T70176 EntityPerPageTable class should be usable from the client | |||
Resolved | Ladsgroup | T67333 Wikibase\EntityPerPageTable::getItemsWithoutSitelinks slow query with large LIMIT offset | |||
Resolved | Addshore | T114902 Remove numeric entity IDs from database schema | |||
Resolved | Ladsgroup | T95685 Drop wb_entity_per_page table | |||
Resolved | Ladsgroup | T140877 In PropertyInfoTableBuilder, replace the usage of wb_entity_per_page with using the page and redirect tables |
Event Timeline
hmm, sure but how we are going to rewrite the query. It does join between pi_property_id = epp_entity_id and also it does order based on epp_entity_id (integer). It seems this needs a higher level refactor :( unless there is something I'm missing.
@Ladsgroup That joins is indeed problematic. But it's only used to detect "new" properties, which do not yet have an entry in wb_property_info. It's triggered when --rebuid-all is set to false (the default). There are several options:
- Remove the --rebuid-all option, and always rebuild all property info entries. There shouldn't be that many properties, so why not.
- Load the set of IDs from wb_property_info first, and just skip the known ones in PHP code. A list of a few thousand integers shouldn't be a problem to hold in memory.
- change the join to use CONCAT( 'P', pi_property_id ) = page_title. This will trigger a file sort, but a) the query is only run manually, by a maintenance script and b) the set of data is going to be small.
Change 350884 had a related patch set uploaded (by Ladsgroup; owner: Amir Sarabadani):
[mediawiki/extensions/Wikibase@master] Drop use of entity_per_page from PropertyInfoTableBuilder
Change 350884 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Drop use of entity_per_page from PropertyInfoTableBuilder