⚓ T303590 Fix localuser rows with lu_local_id or lu_global_id that aren't correctly set
Page Menu
Phabricator
Create Task
Maniphest
T303590
Fix localuser rows with lu_local_id or lu_global_id that aren't correctly set
Open, In Progress, Low
Public
Actions
Edit Task
Edit Related Tasks...
Create Subtask
Edit Parent Tasks
Edit Subtasks
Merge Duplicates In
Close As Duplicate
Edit Related Objects...
Edit Commits
Edit Mocks
Mute Notifications
Protect as security issue
Assigned To
None
Authored By
taavi
Mar 11 2022, 9:44 AM
2022-03-11 09:44:22 (UTC+0)
Tags
MediaWiki-extensions-CentralAuth
(Backlog)
Wikimedia-database-issue (Bad data)
Wikimedia-maintenance-script-run
(WMF Prod)
MW-1.44-notes (1.44.0-wmf.21; 2025-03-18)
MediaWiki-Platform-Team (Q3 Kanban Board)
(Essential Work)
MW-1.46-notes (1.46.0-wmf.14; 2026-02-03)
Referenced Files
F71631367: lu_global_idnull.txt
Jan 30 2026, 7:35 PM
2026-01-30 19:35:08 (UTC+0)
Subscribers
Aklapper
Krinkle
Milimetric
Reedy
taavi
Tgr
Zabe
Description
According to
on production we have some
localuser
rows with
lu_local_id=0
or
lu_global_id=0
Details
Related Changes in Gerrit:
Subject
Repo
Branch
Lines +/-
PopulateLocalAndGlobalIds: Make a better attempt to populate lu_local_id and lu_global_id
mediawiki/extensions/CentralAuth
master
+42
-19
PopulateLocalAndGlobalIds: Query for users where lu_local_id or lu_global_id IS null
mediawiki/extensions/CentralAuth
master
+2
-0
PopulateLocalAndGlobalIds: Don't set lu_local_id if we don't have a mapping...
mediawiki/extensions/CentralAuth
wmf/1.44.0-wmf.21
+18
-9
PopulateLocalAndGlobalIds: Don't set lu_local_id if we don't have a mapping...
mediawiki/extensions/CentralAuth
REL1_43
+18
-9
PopulateLocalAndGlobalIds: Don't set lu_local_id if we don't have a mapping...
mediawiki/extensions/CentralAuth
master
+18
-9
populateLocalAndGlobalIds.php: Fix rows with lu_local_id=0 or lu_global_id=0/null
mediawiki/extensions/CentralAuth
wmf/1.44.0-wmf.21
+12
-4
populateLocalAndGlobalIds.php: Fix rows with lu_local_id=0 or lu_global_id=0/null
mediawiki/extensions/CentralAuth
REL1_43
+12
-4
populateLocalAndGlobalIds.php: Fix rows with lu_local_id=0 or lu_global_id=0/null
mediawiki/extensions/CentralAuth
master
+12
-4
Customize query in gerrit
Related Objects
Search...
Task Graph
Mentions
Duplicates
Status
Subtype
Assigned
Task
In Progress
None
T303590
Fix localuser rows with lu_local_id or lu_global_id that aren't correctly set
Open
None
T411152
Create global accounts for users where lu_global_id is null and only one row for a username
Resolved
Reedy
T388983
localuser rows where lu_global_id IS NOT NULL AND lu_local_id IS NULL not fixed by populateLocalAndGlobalIds.php
Mentioned In
T411152: Create global accounts for users where lu_global_id is null and only one row for a username
T411116: CentralAuth's localuser table contains many nulls and duplicate mappings
T388983: localuser rows where lu_global_id IS NOT NULL AND lu_local_id IS NULL not fixed by populateLocalAndGlobalIds.php
Mentioned Here
T411152: Create global accounts for users where lu_global_id is null and only one row for a username
T388983: localuser rows where lu_global_id IS NOT NULL AND lu_local_id IS NULL not fixed by populateLocalAndGlobalIds.php
T292473: Centralauth localuser table has entries with a null lu_global_id
T142507: Have CentralAuth populate the local_user_id and global_user_id columns as new users are attached
Duplicates Merged Here
T292473: Centralauth localuser table has entries with a null lu_global_id
Event Timeline
There are a very large number of changes, so older changes are hidden.
Show Older Changes
Restricted Application
added a subscriber:
Aklapper
View Herald Transcript
Mar 11 2022, 9:44 AM
2022-03-11 09:44:22 (UTC+0)
Zabe
subscribed.
Mar 11 2022, 12:33 PM
2022-03-11 12:33:37 (UTC+0)
Comment Actions
Meh.
MariaDB [centralauth_p]> select * from localuser where lu_local_id=0;
+---------+------------------------------+-----------------------+--------------------+-------------+--------------+
| lu_wiki | lu_name | lu_attached_timestamp | lu_attached_method | lu_local_id | lu_global_id |
+---------+------------------------------+-----------------------+--------------------+-------------+--------------+
| arwiki | Haaelsalama | 20160721063747 | new | 0 | 47253103 |
| arwiki | Hamo awad | 20160719143320 | new | 0 | 47238617 |
| arwiki | Hany sb | 20160720130326 | new | 0 | 47246866 |
| arwiki | Hollywood-Bollywood | 20160715224935 | new | 0 | 47209021 |
| arwiki | Hussein Omer | 20160713184445 | new | 0 | 47190598 |
| arwiki | Jon Qq11Ww22 | 20160717005916 | new | 0 | 47216945 |
| arwiki | Lara Al-Qarra | 20160717052245 | new | 0 | 47218023 |
| arwiki | Mohamed mahyo | 20160719180157 | new | 0 | 47240197 |
| arwiki | Mohammad swaid | 20160719174859 | new | 0 | 47240112 |
| arwiki | Nevx vx | 20160719193629 | new | 0 | 47240827 |
| arwiki | Saeed AlZuhairi | 20160717213026 | new | 0 | 47223709 |
| arwiki | Sedra janbai | 20160720233048 | new | 0 | 47251115 |
| arwiki | Shimaa gmal | 20160717204515 | new | 0 | 47223468 |
| arwiki | W2adam | 20160718144310 | new | 0 | 47229771 |
| arwiki | محمد نور المحمد | 20160718145542 | new | 0 | 47229875 |
| arwiki | نور مراد | 20160717210828 | new | 0 | 47223595 |
| azbwiki | Pınar. Shaker | 20160717175145 | new | 0 | 47222401 |
| azwiki | İngilab | 20160714220738 | new | 0 | 47200689 |
| bgwiki | GoodGamerBG | 20160714104243 | new | 0 | 47196028 |
| bgwiki | MariaStoicheva | 20160715184216 | new | 0 | 47207651 |
| bgwiki | Zaynmalik1914 | 20160715171659 | new | 0 | 47207123 |
| bnwiki | রকিবুল আলম | 20160716140616 | new | 0 | 47213401 |
| bswiki | Karasupici | 20160718212927 | new | 0 | 47232599 |
+---------+------------------------------+-----------------------+--------------------+-------------+--------------+
23 rows in set (6 min 43.09 sec)
MariaDB [centralauth_p]>
Umherirrender
subscribed.
Mar 11 2022, 7:27 PM
2022-03-11 19:27:45 (UTC+0)
Comment Actions
The timestamp are all from before
T142507: Have CentralAuth populate the local_user_id and global_user_id columns as new users are attached
The script
PopulateLocalAndGlobalIds
only works for
NULL
, not
taavi
renamed this task from
Fix localuser rows with lu_local_id=0
to
Fix localuser rows with lu_local_id=0 or lu_global_id=0
Mar 14 2022, 11:28 AM
2022-03-14 11:28:09 (UTC+0)
taavi
updated the task description.
(Show Details)
Umherirrender
unsubscribed.
Jun 20 2022, 4:14 PM
2022-06-20 16:14:32 (UTC+0)
Tgr
merged a task:
T292473: Centralauth localuser table has entries with a null lu_global_id
Oct 10 2023, 6:22 PM
2023-10-10 18:22:41 (UTC+0)
Tgr
added a subscriber:
Milimetric
Tgr
subscribed.
Oct 10 2023, 7:35 PM
2023-10-10 19:35:45 (UTC+0)
Comment Actions
Per
T292473: Centralauth localuser table has entries with a null lu_global_id
there are also some lingering null values for
lu_global_id
Pppery
added a project:
Wikimedia-database-issue (Bad data)
Oct 10 2023, 11:06 PM
2023-10-10 23:06:08 (UTC+0)
Reedy
mentioned this in
T388983: localuser rows where lu_global_id IS NOT NULL AND lu_local_id IS NULL not fixed by populateLocalAndGlobalIds.php
Mar 15 2025, 9:25 PM
2025-03-15 21:25:06 (UTC+0)
gerritbot
added a comment.
Mar 15 2025, 9:26 PM
2025-03-15 21:26:34 (UTC+0)
Comment Actions
Change #1128018 had a related patch set uploaded (by Reedy; author: Reedy):
[mediawiki/extensions/CentralAuth@master] populateLocalAndGlobalIds.php: Fix rows with lu_local_id=0 or lu_global_id=0
gerritbot
added a project:
Patch-For-Review
Mar 15 2025, 9:26 PM
2025-03-15 21:26:34 (UTC+0)
Reedy
subscribed.
Mar 15 2025, 9:40 PM
2025-03-15 21:40:15 (UTC+0)
Comment Actions
In
T303590#9240465
@Tgr
wrote:
Per
T292473: Centralauth localuser table has entries with a null lu_global_id
there are also some lingering null values for
lu_global_id
Those seem to have gone, maybe before, maybe a side effect of me running
populateLocalAndGlobalIds.php
for
T388983: localuser rows where lu_global_id IS NOT NULL AND lu_local_id IS NULL not fixed by populateLocalAndGlobalIds.php
MariaDB
centralauth
select
count
from
localuser
where
lu_local_id
----------+
count
----------+
19
----------+
row
in
set
min
31
550
sec
MariaDB
centralauth
select
count
from
localuser
where
lu_global_id
----------+
count
----------+
23
----------+
row
in
set
min
25
065
sec
MariaDB
centralauth
select
count
from
localuser
where
lu_global_id
null
----------+
count
----------+
----------+
row
in
set
min
31
441
sec
Krinkle
added a project:
MediaWiki-Platform-Team
Edited
Mar 21 2025, 11:58 PM
2025-03-21 23:58:42 (UTC+0)
Krinkle
subscribed.
Comment Actions
Issue is in scope and has a patch that needs review (alread listed on the team's Gerrit dashboard). Tagging here as well visibility.
gerritbot
added a comment.
Mar 23 2025, 5:02 PM
2025-03-23 17:02:37 (UTC+0)
Comment Actions
Change #1128018
merged
by jenkins-bot:
[mediawiki/extensions/CentralAuth@master] populateLocalAndGlobalIds.php: Fix rows with lu_local_id=0 or lu_global_id=0/null
gerritbot
added a comment.
Mar 23 2025, 5:13 PM
2025-03-23 17:13:11 (UTC+0)
Comment Actions
Change #1130322 had a related patch set uploaded (by Reedy; author: Reedy):
[mediawiki/extensions/CentralAuth@REL1_43] populateLocalAndGlobalIds.php: Fix rows with lu_local_id=0 or lu_global_id=0/null
Reedy
added a project:
Wikimedia-maintenance-script-run
Mar 23 2025, 5:13 PM
2025-03-23 17:13:30 (UTC+0)
gerritbot
added a comment.
Mar 23 2025, 5:24 PM
2025-03-23 17:24:39 (UTC+0)
Comment Actions
Change #1130322
merged
by jenkins-bot:
[mediawiki/extensions/CentralAuth@REL1_43] populateLocalAndGlobalIds.php: Fix rows with lu_local_id=0 or lu_global_id=0/null
Maintenance_bot
removed a project:
Patch-For-Review
Mar 23 2025, 5:30 PM
2025-03-23 17:30:24 (UTC+0)
ReleaseTaggerBot
added a project:
MW-1.44-notes (1.44.0-wmf.22; 2025-03-25)
Mar 23 2025, 6:00 PM
2025-03-23 18:00:48 (UTC+0)
Reedy
changed the task status from
Open
to
In Progress
Mar 23 2025, 6:22 PM
2025-03-23 18:22:01 (UTC+0)
Reedy
triaged this task as
Low
priority.
pmiazga
edited projects, added
MediaWiki-Platform-Team (Roadmap)
; removed
MediaWiki-Platform-Team
Mar 24 2025, 3:41 PM
2025-03-24 15:41:09 (UTC+0)
gerritbot
added a comment.
Mar 24 2025, 3:53 PM
2025-03-24 15:53:55 (UTC+0)
Comment Actions
Change #1130643 had a related patch set uploaded (by Reedy; author: Reedy):
[mediawiki/extensions/CentralAuth@wmf/1.44.0-wmf.21] populateLocalAndGlobalIds.php: Fix rows with lu_local_id=0 or lu_global_id=0/null
gerritbot
added a project:
Patch-For-Review
Mar 24 2025, 3:53 PM
2025-03-24 15:53:55 (UTC+0)
gerritbot
added a comment.
Mar 24 2025, 4:04 PM
2025-03-24 16:04:11 (UTC+0)
Comment Actions
Change #1130643
merged
by jenkins-bot:
[mediawiki/extensions/CentralAuth@wmf/1.44.0-wmf.21] populateLocalAndGlobalIds.php: Fix rows with lu_local_id=0 or lu_global_id=0/null
Maintenance_bot
removed a project:
Patch-For-Review
Mar 24 2025, 4:32 PM
2025-03-24 16:32:13 (UTC+0)
Stashbot
added a comment.
Mar 24 2025, 4:38 PM
2025-03-24 16:38:48 (UTC+0)
Comment Actions
Mentioned in SAL (#wikimedia-operations)
[2025-03-24T16:38:47Z]
T303590
(duration: 11m 51s)
ReleaseTaggerBot
edited projects, added
MW-1.44-notes (1.44.0-wmf.21; 2025-03-18)
; removed
MW-1.44-notes (1.44.0-wmf.22; 2025-03-25)
Mar 24 2025, 5:00 PM
2025-03-24 17:00:24 (UTC+0)
Reedy
added a comment.
Mar 24 2025, 5:13 PM
2025-03-24 17:13:43 (UTC+0)
Comment Actions
Well, this is fun... The number of
lu_global_id=0
accounts has increased slightly in ~9 days...
MariaDB
centralauth
select
count
from
localuser
where
lu_local_id
----------+
count
----------+
19
----------+
row
in
set
min
328
sec
MariaDB
centralauth
select
count
from
localuser
where
lu_local_id
null
----------+
count
----------+
----------+
row
in
set
min
29
084
sec
MariaDB
centralauth
select
count
from
localuser
where
lu_global_id
----------+
count
----------+
27
----------+
row
in
set
min
16
572
sec
MariaDB
centralauth
select
count
from
localuser
where
lu_global_id
null
----------+
count
----------+
----------+
row
in
set
min
21
253
sec
MariaDB
centralauth
SELECT
count
FROM
localuser
WHERE
lu_global_id
IS
NOT
NULL
AND
lu_local_id
IS
NULL
->
----------+
count
----------+
486
----------+
row
in
set
min
19
639
sec
Tgr
added a comment.
Mar 24 2025, 5:20 PM
2025-03-24 17:20:44 (UTC+0)
Comment Actions
Can we make a list of the affected recent accounts? I guess that would require looking at the dumps?
Reedy
added a comment.
Mar 24 2025, 5:33 PM
2025-03-24 17:33:27 (UTC+0)
Comment Actions
Posted an updated list on
T388983: localuser rows where lu_global_id IS NOT NULL AND lu_local_id IS NULL not fixed by populateLocalAndGlobalIds.php
for that specific case.. Could do an awkward diff between the two lists.
475 -> 486.
A couple have timestamps that start 2025...
Reedy
added a comment.
Mar 24 2025, 5:36 PM
2025-03-24 17:36:58 (UTC+0)
Comment Actions
I never actually did a dump of rows for
lu_local_id=0 or lu_global_id=0
, but as is, they are:
MariaDB
centralauth
select
from
localuser
where
lu_local_id
or
lu_global_id
---------------+-----------------------------------------------+-----------------------+--------------------+-------------+--------------+----------------------+
lu_wiki
lu_name
lu_attached_timestamp
lu_attached_method
lu_local_id
lu_global_id
lu_attachment_method
---------------+-----------------------------------------------+-----------------------+--------------------+-------------+--------------+----------------------+
arwiki
Asseriano
20150419012835
primary
299420
NULL
arwiki
Hamo
awad
20160719143320
new
47238617
NULL
arwiki
Hany
sb
20160720130326
new
47246866
NULL
arwiki
Hollywood
Bollywood
20160715224935
new
47209021
NULL
arwiki
Jon
Qq11Ww22
20160717005916
new
47216945
NULL
arwiki
Lara
Al
Qarra
20160717052245
new
47218023
NULL
arwiki
Mohamed
mahyo
20160719180157
new
47240197
NULL
arwiki
Mohammad
swaid
20160719174859
new
47240112
NULL
arwiki
Nevx
vx
20160719193629
new
47240827
NULL
arwiki
Sedra
janbai
20160720233048
new
47251115
NULL
arwiki
Shimaa
gmal
20160717204515
new
47223468
NULL
arwiki
W2adam
20160718144310
new
47229771
NULL
arwiki
محمد
نور
المحمد
20160718145542
new
47229875
NULL
arwiki
نور
مراد
20160717210828
new
47223595
NULL
azwiki
İngilab
20160714220738
new
47200689
NULL
bgwiki
GoodGamerBG
20160714104243
new
47196028
NULL
bgwiki
MariaStoicheva
20160715184216
new
47207651
NULL
bgwiki
Zaynmalik1914
20160715171659
new
47207123
NULL
bnwiki
রকিবুল
আলম
20160716140616
new
47213401
NULL
bswiki
Karasupici
20160718212927
new
47232599
NULL
cawiki
OpenCapa8
20250303213356
512143
NULL
commonswiki
Juniorzootec
20250117233827
13528007
NULL
commonswiki
L72hrppm
20250311182442
13652735
NULL
commonswiki
Mrzdexter
20250323080258
13677172
NULL
cswiki
ercasek
20221026055620
admin
32772
NULL
dewiki
Mrzdexter
20250323080258
4589521
NULL
dewiki
Renamed
user
af1413e2b4f442c6d1fbcb9a51cdcb49
20240919052606
new
4474699
NULL
enwiki
20221026052801
admin
8463245
NULL
enwiki
20221026035545
admin
8569079
NULL
enwiki
oo
20211104205856
admin
NULL
NULL
enwiki
20211104205107
admin
NULL
NULL
enwiki
ksplosɪv
kæŋgəʃæn
20211104205833
admin
NULL
NULL
enwiki
20211104205534
admin
NULL
NULL
enwiki
Ʞɔ
20211104205510
admin
NULL
NULL
enwiki
Ʞɔ
nɟ
20211104205443
admin
NULL
NULL
enwiki
Ʞɔ
nɥɔ
20211104205419
admin
NULL
NULL
enwiki
Ʞəʇɹɐ
20211104205400
admin
NULL
NULL
enwiki
20211104205812
admin
NULL
NULL
enwiki
dɯoɹdɥsɐq
20211104205746
admin
NULL
NULL
enwiki
20211104205625
admin
NULL
NULL
enwiki
Ʝɑɕƙ
ʛɩƛɛȿƿɨɘ
20211104205559
admin
NULL
NULL
incubatorwiki
Ⲫⲟⲩⲁⲙⲁⲣⲁⲃⲟⲥ
20211104204955
admin
NULL
NULL
mediawikiwiki
Ⲫⲟⲩⲁⲙⲁⲣⲁⲃⲟⲥ
20211104204944
admin
NULL
NULL
metawiki
Ⲫⲟⲩⲁⲙⲁⲣⲁⲃⲟⲥ
20211104204856
admin
NULL
NULL
metawiki
dɯoɹdɥsɐq
20211104205720
admin
NULL
NULL
metawiki
sıdɐɹ
ʇʇ
nq
20211104205706
admin
NULL
NULL
---------------+-----------------------------------------------+-----------------------+--------------------+-------------+--------------+----------------------+
46
rows
in
set
min
500
sec
At least one of the
lu_global_id = 0
rows is specifically recently attached:
20250323080258
Reedy
added a comment.
Mar 24 2025, 6:27 PM
2025-03-24 18:27:17 (UTC+0)
Comment Actions
Post script run...
MariaDB
centralauth
select
from
localuser
where
lu_local_id
or
lu_global_id
---------------+-----------------------------------+-----------------------+--------------------+-------------+--------------+----------------------+
lu_wiki
lu_name
lu_attached_timestamp
lu_attached_method
lu_local_id
lu_global_id
lu_attachment_method
---------------+-----------------------------------+-----------------------+--------------------+-------------+--------------+----------------------+
enwiki
oo
20211104205856
admin
NULL
NULL
enwiki
20211104205107
admin
NULL
NULL
enwiki
ksplosɪv
kæŋgəʃæn
20211104205833
admin
NULL
NULL
enwiki
20211104205534
admin
NULL
NULL
enwiki
Ʞɔ
20211104205510
admin
NULL
NULL
enwiki
Ʞɔ
nɟ
20211104205443
admin
NULL
NULL
enwiki
Ʞɔ
nɥɔ
20211104205419
admin
NULL
NULL
enwiki
Ʞəʇɹɐ
20211104205400
admin
NULL
NULL
enwiki
20211104205812
admin
NULL
NULL
enwiki
dɯoɹdɥsɐq
20211104205746
admin
NULL
NULL
enwiki
20211104205625
admin
NULL
NULL
enwiki
Ʝɑɕƙ
ʛɩƛɛȿƿɨɘ
20211104205559
admin
NULL
NULL
incubatorwiki
Ⲫⲟⲩⲁⲙⲁⲣⲁⲃⲟⲥ
20211104204955
admin
NULL
NULL
mediawikiwiki
Ⲫⲟⲩⲁⲙⲁⲣⲁⲃⲟⲥ
20211104204944
admin
NULL
NULL
metawiki
Ⲫⲟⲩⲁⲙⲁⲣⲁⲃⲟⲥ
20211104204856
admin
NULL
NULL
metawiki
dɯoɹdɥsɐq
20211104205720
admin
NULL
NULL
metawiki
sıdɐɹ
ʇʇ
nq
20211104205706
admin
NULL
NULL
---------------+-----------------------------------+-----------------------+--------------------+-------------+--------------+----------------------+
17
rows
in
set
min
40
763
sec
Seems to have fixed nearly all of them, except those from a very specific timeframe...
Reedy
added a comment.
Mar 24 2025, 6:27 PM
2025-03-24 18:27:59 (UTC+0)
Comment Actions
A quick look at one...
apparently no global account?
Reedy
added a comment.
Mar 24 2025, 6:29 PM
2025-03-24 18:29:39 (UTC+0)
Comment Actions
More fun and games:
Error
service.version: 1.44.0-wmf.21
trace.id:
2983e6c9d2bb9c15f7134c9e
Find trace.id in Logstash
labels.normalized_message
[{reqId}] {exception_url} PHP Notice: Undefined index: YAIZD
Frame
Location
Call
from
/srv/mediawiki-staging/php-1.44.0-wmf.21/extensions/CentralAuth/maintenance/populateLocalAndGlobalIds.php(103)
#0
/srv/mediawiki-staging/php-1.44.0-wmf.21/extensions/CentralAuth/maintenance/populateLocalAndGlobalIds.php(103)
MWExceptionHandler::handleError(int, string, string, int, array)
#1
/srv/mediawiki-staging/php-1.44.0-wmf.21/maintenance/includes/MaintenanceRunner.php(695)
MediaWiki\Extension\CentralAuth\Maintenance\PopulateLocalAndGlobalIds->execute()
#2
/srv/mediawiki-staging/php-1.44.0-wmf.21/maintenance/run.php(51)
MediaWiki\Maintenance\MaintenanceRunner->run()
#3
/srv/mediawiki-staging/multiversion/MWScript.php(219)
require_once(string)
#4
{main}
Impact
Notes
gerritbot
added a comment.
Mar 24 2025, 6:37 PM
2025-03-24 18:37:29 (UTC+0)
Comment Actions
Change #1130695 had a related patch set uploaded (by Reedy; author: Reedy):
[mediawiki/extensions/CentralAuth@master] PopulateLocalAndGlobalIds: Don't set lu_local_id if we don't have a mapping...
gerritbot
added a project:
Patch-For-Review
Mar 24 2025, 6:37 PM
2025-03-24 18:37:30 (UTC+0)
gerritbot
added a comment.
Mar 24 2025, 8:13 PM
2025-03-24 20:13:02 (UTC+0)
Comment Actions
Change #1130695
merged
by jenkins-bot:
[mediawiki/extensions/CentralAuth@master] PopulateLocalAndGlobalIds: Don't set lu_local_id if we don't have a mapping...
gerritbot
added a comment.
Mar 24 2025, 8:14 PM
2025-03-24 20:14:09 (UTC+0)
Comment Actions
Change #1130711 had a related patch set uploaded (by Reedy; author: Reedy):
[mediawiki/extensions/CentralAuth@REL1_43] PopulateLocalAndGlobalIds: Don't set lu_local_id if we don't have a mapping...
gerritbot
added a comment.
Mar 24 2025, 8:15 PM
2025-03-24 20:15:28 (UTC+0)
Comment Actions
Change #1130712 had a related patch set uploaded (by Reedy; author: Reedy):
[mediawiki/extensions/CentralAuth@wmf/1.44.0-wmf.21] PopulateLocalAndGlobalIds: Don't set lu_local_id if we don't have a mapping...
ReleaseTaggerBot
edited projects, added
MW-1.44-notes (1.44.0-wmf.22; 2025-03-25)
; removed
MW-1.44-notes (1.44.0-wmf.21; 2025-03-18)
Mar 24 2025, 9:00 PM
2025-03-24 21:00:46 (UTC+0)
gerritbot
added a comment.
Mar 24 2025, 9:09 PM
2025-03-24 21:09:44 (UTC+0)
Comment Actions
Change #1130711
merged
by jenkins-bot:
[mediawiki/extensions/CentralAuth@REL1_43] PopulateLocalAndGlobalIds: Don't set lu_local_id if we don't have a mapping...
gerritbot
added a comment.
Mar 24 2025, 9:52 PM
2025-03-24 21:52:08 (UTC+0)
Comment Actions
Change #1130712
merged
by jenkins-bot:
[mediawiki/extensions/CentralAuth@wmf/1.44.0-wmf.21] PopulateLocalAndGlobalIds: Don't set lu_local_id if we don't have a mapping...
ReleaseTaggerBot
edited projects, added
MW-1.44-notes (1.44.0-wmf.21; 2025-03-18)
; removed
MW-1.44-notes (1.44.0-wmf.22; 2025-03-25)
Mar 24 2025, 10:00 PM
2025-03-24 22:00:27 (UTC+0)
Stashbot
added a comment.
Mar 24 2025, 10:04 PM
2025-03-24 22:04:54 (UTC+0)
Comment Actions
Mentioned in SAL (#wikimedia-operations)
[2025-03-24T22:04:54Z]
T303590
(duration: 11m 56s)
Maintenance_bot
removed a project:
Patch-For-Review
Mar 24 2025, 10:30 PM
2025-03-24 22:30:42 (UTC+0)
Reedy
moved this task from
Backlog
to
WMF Prod
on the
Wikimedia-maintenance-script-run
board.
Aug 7 2025, 8:52 AM
2025-08-07 08:52:17 (UTC+0)
Reedy
added a comment.
Aug 7 2025, 9:00 AM
2025-08-07 09:00:13 (UTC+0)
Comment Actions
wikiadmin2023
10
64
32
139
centralauth
select
from
localuser
where
lu_local_id
or
lu_global_id
---------------+-----------------------------------+-----------------------+--------------------+-------------+--------------+----------------------+
lu_wiki
lu_name
lu_attached_timestamp
lu_attached_method
lu_local_id
lu_global_id
lu_attachment_method
---------------+-----------------------------------+-----------------------+--------------------+-------------+--------------+----------------------+
alswiki
R46
Foamer
20240119174404
102857
NULL
arwiki
Nahida
usurped
20150317085447
primary
428008
NULL
bewiki
R46
Foamer
20250130174855
150454
NULL
enwiki
oo
20211104205856
admin
NULL
NULL
enwiki
20211104205107
admin
NULL
NULL
enwiki
ksplosɪv
kæŋgəʃæn
20211104205833
admin
NULL
NULL
enwiki
20211104205534
admin
NULL
NULL
enwiki
Ʞɔ
20211104205510
admin
NULL
NULL
enwiki
Ʞɔ
nɟ
20211104205443
admin
NULL
NULL
enwiki
Ʞɔ
nɥɔ
20211104205419
admin
NULL
NULL
enwiki
Ʞəʇɹɐ
20211104205400
admin
NULL
NULL
enwiki
20211104205812
admin
NULL
NULL
enwiki
dɯoɹdɥsɐq
20211104205746
admin
NULL
NULL
enwiki
20211104205625
admin
NULL
NULL
enwiki
Ʝɑɕƙ
ʛɩƛɛȿƿɨɘ
20211104205559
admin
NULL
NULL
incubatorwiki
Ⲫⲟⲩⲁⲙⲁⲣⲁⲃⲟⲥ
20211104204955
admin
NULL
NULL
mediawikiwiki
Ⲫⲟⲩⲁⲙⲁⲣⲁⲃⲟⲥ
20211104204944
admin
NULL
NULL
metawiki
Ⲫⲟⲩⲁⲙⲁⲣⲁⲃⲟⲥ
20211104204856
admin
NULL
NULL
metawiki
dɯoɹdɥsɐq
20211104205720
admin
NULL
NULL
metawiki
sıdɐɹ
ʇʇ
nq
20211104205706
admin
NULL
NULL
---------------+-----------------------------------+-----------------------+--------------------+-------------+--------------+----------------------+
20
rows
in
set
min
51
821
sec
Reedy
added a comment.
Aug 7 2025, 9:07 AM
2025-08-07 09:07:42 (UTC+0)
Comment Actions
wikiadmin2023
10
64
32
139
centralauth
select
count
from
localuser
where
lu_local_id
select
count
from
localuser
where
lu_local_id
null
select
count
from
localuser
where
lu_global_id
select
count
from
localuser
where
lu_global_id
null
SELECT
count
FROM
localuser
WHERE
lu_global_id
IS
NOT
NULL
AND
lu_local_id
IS
NULL
----------+
count
----------+
----------+
row
in
set
min
26
762
sec
----------+
count
----------+
----------+
row
in
set
min
27
981
sec
----------+
count
----------+
20
----------+
row
in
set
min
21
604
sec
----------+
count
----------+
----------+
row
in
set
min
26
920
sec
----------+
count
----------+
4909
----------+
row
in
set
min
26
719
sec
Well that last one has exploded...
Reedy
added a comment.
Aug 7 2025, 9:17 AM
2025-08-07 09:17:30 (UTC+0)
Comment Actions
Number of attached accounts: 0
Reedy
added a comment.
Aug 7 2025, 11:25 AM
2025-08-07 11:25:41 (UTC+0)
Comment Actions
Re-running the script does fix most of it up again..
wikiadmin2023
10
64
136
13
centralauth
select
count
from
localuser
where
lu_local_id
select
count
from
localuser
where
lu_local_id
null
select
count
from
localuser
where
lu_global_id
select
count
from
localuser
where
lu_global_id
null
SELECT
count
FROM
localuser
WHERE
lu_global_id
IS
NOT
NULL
AND
lu_local_id
IS
NULL
----------+
count
----------+
----------+
row
in
set
min
38
647
sec
----------+
count
----------+
----------+
row
in
set
50
146
sec
----------+
count
----------+
17
----------+
row
in
set
44
249
sec
----------+
count
----------+
----------+
row
in
set
47
835
sec
----------+
count
----------+
246
----------+
row
in
set
45
997
sec
wikiadmin2023
10
64
136
13
centralauth
Reedy
mentioned this in
T411116: CentralAuth's localuser table contains many nulls and duplicate mappings
Nov 26 2025, 8:57 PM
2025-11-26 20:57:35 (UTC+0)
Reedy
added a comment.
Nov 26 2025, 10:29 PM
2025-11-26 22:29:30 (UTC+0)
Comment Actions
After another script run...
wikiadmin2023
10
192
32
98
centralauth
select
count
from
localuser
where
lu_local_id
select
count
from
localuser
where
lu_local_id
null
select
count
from
localuser
where
lu_global_id
select
count
from
localuser
where
lu_global_id
null
SELECT
count
FROM
localuser
WHERE
lu_global_id
IS
NOT
NULL
AND
lu_local_id
IS
NULL
----------+
count
----------+
----------+
row
in
set
min
24
338
sec
----------+
count
----------+
----------+
row
in
set
50
817
sec
----------+
count
----------+
17
----------+
row
in
set
42
318
sec
----------+
count
----------+
----------+
row
in
set
49
024
sec
----------+
count
----------+
129
----------+
Movement in the right direction on the last query...
Reedy
added a comment.
Nov 26 2025, 10:36 PM
2025-11-26 22:36:45 (UTC+0)
Comment Actions
Of course...
wikiadmin2023
10
192
32
98
centralauth
select
count
from
localuser
where
lu_local_id
is
null
select
count
from
localuser
where
lu_global_id
is
null
----------+
count
----------+
4042
----------+
row
in
set
44
294
sec
----------+
count
----------+
3913
----------+
row
in
set
41
767
sec
gerritbot
added a comment.
Nov 26 2025, 10:42 PM
2025-11-26 22:42:32 (UTC+0)
Comment Actions
Change #1211821 had a related patch set uploaded (by Reedy; author: Reedy):
[mediawiki/extensions/CentralAuth@master] PopulateLocalAndGlobalIds: Query for users where lu_local_id or lu_global_id IS null
gerritbot
added a project:
Patch-For-Review
Nov 26 2025, 10:42 PM
2025-11-26 22:42:33 (UTC+0)
gerritbot
added a comment.
Nov 26 2025, 10:53 PM
2025-11-26 22:53:18 (UTC+0)
Comment Actions
Change #1211821
abandoned
by Reedy:
[mediawiki/extensions/CentralAuth@master] PopulateLocalAndGlobalIds: Query for users where lu_local_id or lu_global_id IS null
Maintenance_bot
removed a project:
Patch-For-Review
Nov 26 2025, 11:31 PM
2025-11-26 23:31:41 (UTC+0)
gerritbot
added a comment.
Nov 26 2025, 11:54 PM
2025-11-26 23:54:21 (UTC+0)
Comment Actions
Change #1211847 had a related patch set uploaded (by Reedy; author: Reedy):
[mediawiki/extensions/CentralAuth@master] PopulateLocalAndGlobalIds: Make a better attempt to populate lu_local_id
gerritbot
added a project:
Patch-For-Review
Nov 26 2025, 11:54 PM
2025-11-26 23:54:22 (UTC+0)
Reedy
added a comment.
Nov 27 2025, 12:31 AM
2025-11-27 00:31:41 (UTC+0)
Comment Actions
After running that latest script PS... That has cleared up 3526 rows where
lu_local_id is null
wikiadmin2023
10
192
48
205
centralauth
select
count
from
localuser
where
lu_local_id
is
null
select
count
from
localuser
where
lu_global_id
is
null
----------+
count
----------+
516
----------+
row
in
set
49
696
sec
----------+
count
----------+
3913
----------+
row
in
set
42
032
sec
Reedy
added a comment.
Dec 5 2025, 12:56 AM
2025-12-05 00:56:03 (UTC+0)
Comment Actions
A week later, it's not got any worse...
wikiadmin2023
10
192
32
98
centralauth
select
count
from
localuser
where
lu_local_id
is
null
select
count
from
localuser
where
lu_global_id
is
null
----------+
count
----------+
516
----------+
row
in
set
43
619
sec
----------+
count
----------+
3913
----------+
row
in
set
41
663
sec
Reedy
mentioned this in
T411152: Create global accounts for users where lu_global_id is null and only one row for a username
Dec 5 2025, 12:57 AM
2025-12-05 00:57:07 (UTC+0)
OWresch-WMF
edited projects, added
MediaWiki-Platform-Team
; removed
MediaWiki-Platform-Team (Roadmap)
Jan 16 2026, 1:55 PM
2026-01-16 13:55:18 (UTC+0)
matmarex
moved this task from
Inbox, needs triage
to
Q3 Kanban Board
on the
MediaWiki-Platform-Team
board.
Jan 19 2026, 3:52 PM
2026-01-19 15:52:31 (UTC+0)
matmarex
edited projects, added
MediaWiki-Platform-Team (Q3 Kanban Board)
; removed
MediaWiki-Platform-Team
matmarex
moved this task from
Essential Work
to
In Progress
on the
MediaWiki-Platform-Team (Q3 Kanban Board)
board.
Reedy
added a comment.
Jan 28 2026, 5:40 PM
2026-01-28 17:40:30 (UTC+0)
Comment Actions
wikiadmin2023
10
192
32
98
centralauth
select
count
from
localuser
where
lu_local_id
select
count
from
localuser
where
lu_local_id
null
select
count
from
localuser
where
lu_global_id
select
count
from
localuser
where
lu_global_id
null
SELECT
count
FROM
localuser
WHERE
lu_global_id
IS
NOT
NULL
AND
lu_local_id
IS
NULL
select
count
from
localuser
where
lu_local_id
is
null
select
count
from
localuser
where
lu_global_id
is
null
----------+
count
----------+
----------+
row
in
set
44
890
sec
----------+
count
----------+
----------+
row
in
set
49
203
sec
----------+
count
----------+
17
----------+
row
in
set
43
243
sec
----------+
count
----------+
----------+
row
in
set
48
245
sec
----------+
count
----------+
93
----------+
row
in
set
47
577
sec
----------+
count
----------+
480
----------+
row
in
set
42
118
sec
----------+
count
----------+
3913
----------+
row
in
set
42
359
sec
Reedy
added a comment.
Edited
Jan 29 2026, 12:13 AM
2026-01-29 00:13:05 (UTC+0)
Comment Actions
So the non zero queries are:
select count(*) from localuser where lu_global_id = 0; SELECT count(*) FROM localuser WHERE lu_global_id IS NOT NULL AND lu_local_id IS NULL; select count(*) from localuser where lu_local_id is null; select count(*) from localuser where lu_global_id is null;
But further progress...
wikiadmin2023
10
192
32
15
centralauth
select
count
from
localuser
where
lu_local_id
select
count
from
localuser
where
lu_local_id
null
select
count
from
localuser
where
lu_global_id
select
count
from
localuser
where
lu_global_id
null
SELECT
count
FROM
localuser
WHERE
lu_global_id
IS
NOT
NULL
AND
lu_local_id
IS
NULL
select
count
from
localuser
where
lu_local_id
is
null
select
count
from
localuser
where
lu_global_id
is
null
----------+
count
----------+
----------+
row
in
set
32
252
sec
----------+
count
----------+
----------+
row
in
set
35
389
sec
----------+
count
----------+
17
----------+
row
in
set
31
482
sec
----------+
count
----------+
----------+
row
in
set
34
745
sec
----------+
count
----------+
67
----------+
row
in
set
33
537
sec
----------+
count
----------+
316
----------+
row
in
set
28
833
sec
----------+
count
----------+
3913
----------+
row
in
set
28
990
sec
Reedy
added a comment.
Edited
Jan 29 2026, 4:39 AM
2026-01-29 04:39:23 (UTC+0)
Comment Actions
Fixing
T388983: localuser rows where lu_global_id IS NOT NULL AND lu_local_id IS NULL not fixed by populateLocalAndGlobalIds.php
(and related playing around for it with other scripts) has basically resolved most of these corruptions/weirdnesses...
Therefore if only
select count(*) from localuser where lu_global_id is null;
is left...
Need to double check if there's user accounts on the local wikis. If there is, create a global account and attach them. Or if there isn't at this point, delete them...
DeleteEmptyAccounts
But otherwise, it's
T411152: Create global accounts for users where lu_global_id is null and only one row for a username
wikiadmin2023
10
192
32
15
centralauth
select
count
from
localuser
where
lu_local_id
select
count
from
localuser
where
lu_local_id
null
select
count
from
localuser
where
lu_global_id
select
count
from
localuser
where
lu_global_id
null
SELECT
count
FROM
localuser
WHERE
lu_global_id
IS
NOT
NULL
AND
lu_local_id
IS
NULL
select
count
from
localuser
where
lu_local_id
is
null
select
count
from
localuser
where
lu_global_id
is
null
----------+
count
----------+
----------+
row
in
set
32
026
sec
----------+
count
----------+
----------+
row
in
set
35
917
sec
----------+
count
----------+
----------+
row
in
set
33
472
sec
----------+
count
----------+
----------+
row
in
set
36
189
sec
----------+
count
----------+
----------+
row
in
set
35
027
sec
----------+
count
----------+
----------+
row
in
set
29
416
sec
----------+
count
----------+
3913
----------+
row
in
set
29
385
sec
Reedy
added a subtask:
T411152: Create global accounts for users where lu_global_id is null and only one row for a username
Jan 29 2026, 4:40 AM
2026-01-29 04:40:24 (UTC+0)
Reedy
added a subtask:
T388983: localuser rows where lu_global_id IS NOT NULL AND lu_local_id IS NULL not fixed by populateLocalAndGlobalIds.php
gerritbot
added a comment.
Jan 29 2026, 8:28 PM
2026-01-29 20:28:08 (UTC+0)
Comment Actions
Change #1211847
merged
by jenkins-bot:
[mediawiki/extensions/CentralAuth@master] PopulateLocalAndGlobalIds: Make a better attempt to populate lu_local_id and lu_global_id
Maintenance_bot
removed a project:
Patch-For-Review
Jan 29 2026, 8:32 PM
2026-01-29 20:32:05 (UTC+0)
ReleaseTaggerBot
added a project:
MW-1.46-notes (1.46.0-wmf.14; 2026-02-03)
Jan 29 2026, 9:00 PM
2026-01-29 21:00:46 (UTC+0)
Reedy
renamed this task from
Fix localuser rows with lu_local_id=0 or lu_global_id=0
to
Fix localuser rows with lu_local_id or lu_global_id that aren't correctly set
Jan 30 2026, 6:38 PM
2026-01-30 18:38:26 (UTC+0)
Reedy
added a comment.
Jan 30 2026, 7:35 PM
2026-01-30 19:35:08 (UTC+0)
Comment Actions
Running
migratePass1.php
(after
migratePass0.php
before that) created 153 accounts:
2026-01-30 05:18:18 processed 84072636 usernames (805.3/sec), 153 (0.0%) fully migrated (@ ÿبندرالعوضه)
But that hasn't fixed any of the
lu_global_id is null
rows. So between
T411152: Create global accounts for users where lu_global_id is null and only one row for a username
and this...
lu_global_idnull.txt
226 KB
A quick scan of the output seems to suggest they're mostly created around 2013/2014...
DAlangi_WMF
moved this task from
In Progress
to
Essential Work
on the
MediaWiki-Platform-Team (Q3 Kanban Board)
board.
Feb 18 2026, 12:04 PM
2026-02-18 12:04:18 (UTC+0)
Log In to Comment
Content licensed under Creative Commons Attribution-ShareAlike (CC BY-SA) 4.0 unless otherwise noted; code licensed under GNU General Public License (GPL) 2.0 or later and other open source licenses. By using this site, you agree to the Terms of Use, Privacy Policy, and Code of Conduct.
Wikimedia Foundation
Code of Conduct
Disclaimer
CC-BY-SA
GPL
Credits