Directory

⚓ T373038 fetchZidsOfType only returns objects that have at least one label
Page MenuHomePhabricator

fetchZidsOfType only returns objects that have at least one label
Closed, ResolvedPublicBUG REPORT

Description

Description

The ZObjectStore method fetchZidsOfType uses the wikilambda_zobject_labels table to return an array of Zids of a given type.
This table only contains those objects that have at least one label or alias. However, labels and aliases are not mandatory, so this method will not return all the existing objects but only the unlabelled ones.

updateSeondaryTables Hook and other maintenance scripts use this method, assuming that it will capture ALL the persisted objects of a certain type. This is not the case.

Expected behavior (Acceptance criteria):

  • fetchZidsOfType method should return all zids of a given type, no matter their state.

Completion checklist

Event Timeline

Change #1088549 had a related patch set uploaded (by Jforrester; author: Genoveva Galarza):

[mediawiki/extensions/WikiLambda@master] Insert fake MUL alias to the labels table to make unnamed objects searchable

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

Change #1088549 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Insert fake MUL alias to the labels table to make unnamed objects searchable

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

Mentioned in SAL (#wikimedia-operations) [2024-11-14T19:20:16Z] <James_F> Running mwscript-k8s -f -- extensions/WikiLambda/maintenance/updateSecondaryTables.php --wiki=wikifunctionswiki --zType Z8 --report --verbose for T375972, T367005, T373038, T358737