Page MenuHomePhabricator

CentralAuth (unused?) globalnames table getting out of sync
Open, Needs TriagePublic

Description

CA has a globalnames table, which is (rather unsuprisingly) a list of all usernames that exists globally. However, looks like nothing else than migration scripts and importLocalNames (most of its runs were killed with T150506: Avoid lazyImportLocalNames() master writes on GET requests (Run a script to backfill them once for all)) are writing there. Additionally I don't see any reads from the table.

Are there any reasons why we might need to read it in the future (Wikitech SUL migration anyone?) or can it be removed totally?

Event Timeline

globalnames should be written to upon account creation and updated on account rename, is that not happening?

Otherwise migratePass0 can be used to backfill the table pretty quickly.

globalnames should be written to upon account creation and updated on account rename, is that not happening?

No, none of those seem to be writing anything to globalnames. Localnames works fine though.

When I understand rSVN24583 correctly, then the globalnames table was only meant as a performance optimization for CentralAuthUser::lazyImportLocalNames while migrating. Since we have removed this method and sul finalisation happened, I also think that the table can be removed.

Are there any reasons why we might need to read it in the future (Wikitech SUL migration anyone?)

Even if the Wikitech SUL migration should happen, I don't think this table is necessary. To check if a username is assigned, the localuser table can be used and with the small number of users in wikitech this is absolutely fine.