Page MenuHomePhabricator

Remove notification_seen column from echo_notifications database table
Closed, ResolvedPublic

Description

Per T135661#2644446, this was never implemented. I'd guess this functionality is now duplicated by notification_read_timestamp being not-NULL. Filing this ticket for the DBA folks to remove it, as requested by @Ladsgroup on Slack

Event Timeline

Marostegui triaged this task as Medium priority.
Marostegui moved this task from Triage to Ready on the DBA board.

I'd guess this functionality is now duplicated by notification_read_timestamp being not-NULL

For posterity: it's not, because "read" and "seen" are different concepts. Seen-ness is instead implemented through a "seen timestamp" for each user that is stored in a cache ($wgMainStash in the default config, the echoseen store in Kask in the production config). The "seen timestamp" is the time when the user last opened something that shows them their notifications (e.g. clicked the notifications dropdown, or went to Special:Notifications). This means that whether a notification has been seen can be computed with notification_timestamp < seentime. (Really there are two seentimes for each user, one for alerts and one for notices. Seentimes are also stored globally using the global user IDs from CentralAuth, not separately for each wiki.)

I'll be dropping this column soon. Noting that this is in x1, I think it's RBR, so we need to set the replication, run the script and move it back again. The tables must be quite small now.

Mentioned in SAL (#wikimedia-operations) [2023-09-11T11:42:45Z] <Amir1> setting binlog format to STATEMENT in x1 eqiad and codfw masters (T337310)

Change 956412 had a related patch set uploaded (by Ladsgroup; author: Amir Sarabadani):

[operations/software/schema-changes@master] Add drop_notification_seen_T337310.py

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

Mentioned in SAL (#wikimedia-operations) [2023-09-11T12:25:36Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Depooling db1137 (T337310)', diff saved to https://phabricator.wikimedia.org/P52408 and previous config saved to /var/cache/conftool/dbconfig/20230911-122535-ladsgroup.json

Change 956412 merged by jenkins-bot:

[operations/software/schema-changes@master] Add drop_notification_seen_T337310.py

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

Mentioned in SAL (#wikimedia-operations) [2023-09-11T13:10:01Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db1137 (T337310)', diff saved to https://phabricator.wikimedia.org/P52409 and previous config saved to /var/cache/conftool/dbconfig/20230911-131001-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2023-09-11T13:55:20Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db1137 (T337310)', diff saved to https://phabricator.wikimedia.org/P52414 and previous config saved to /var/cache/conftool/dbconfig/20230911-135520-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2023-09-11T14:31:02Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Depooling db1220 (T337310)', diff saved to https://phabricator.wikimedia.org/P52416 and previous config saved to /var/cache/conftool/dbconfig/20230911-143102-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2023-09-11T14:39:38Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db1220 (T337310)', diff saved to https://phabricator.wikimedia.org/P52417 and previous config saved to /var/cache/conftool/dbconfig/20230911-143937-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2023-09-11T15:24:56Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db1220 (T337310)', diff saved to https://phabricator.wikimedia.org/P52420 and previous config saved to /var/cache/conftool/dbconfig/20230911-152456-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2023-09-11T16:46:13Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Depooling db2096 (T337310)', diff saved to https://phabricator.wikimedia.org/P52423 and previous config saved to /var/cache/conftool/dbconfig/20230911-164249-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2023-09-11T16:58:03Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db2096 (T337310)', diff saved to https://phabricator.wikimedia.org/P52424 and previous config saved to /var/cache/conftool/dbconfig/20230911-165802-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2023-09-11T17:43:22Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db2096 (T337310)', diff saved to https://phabricator.wikimedia.org/P52427 and previous config saved to /var/cache/conftool/dbconfig/20230911-174321-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2023-09-11T18:42:32Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Depooling db2131 (T337310)', diff saved to https://phabricator.wikimedia.org/P52428 and previous config saved to /var/cache/conftool/dbconfig/20230911-184231-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2023-09-11T18:58:14Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db2131 (T337310)', diff saved to https://phabricator.wikimedia.org/P52429 and previous config saved to /var/cache/conftool/dbconfig/20230911-185813-ladsgroup.json

Mentioned in SAL (#wikimedia-operations) [2023-09-11T19:43:33Z] <ladsgroup@cumin1001> dbctl commit (dc=all): 'Repooling after maintenance db2131 (T337310)', diff saved to https://phabricator.wikimedia.org/P52432 and previous config saved to /var/cache/conftool/dbconfig/20230911-194332-ladsgroup.json