Page MenuHomePhabricator

Stop deletion of rows in the cu_useragent_clienthints table
Closed, ResolvedPublic

Description

After a discussion with T&S and Legal, the decision has been made to stop deletion of rows in the cu_useragent_clienthints table. This is because the rows with no mapping data cannot be linked to a given user or edit. At a later date a maintenance script may be added to purge orphaned rows, but some thought will need to be given to how best to delete these rows without causing race conditions on the delete operation against other insert operations.

Acceptance criteria
  • Rows are no longer purged from cu_useragent_clienthints

QA Results - Local

Event Timeline

Change 954758 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/CheckUser@master] clienthints: Don't delete rows from cu_useragent_clienthints

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

Change 954758 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] clienthints: Don't delete rows from cu_useragent_clienthints

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

Suggested QA steps:

  1. Install CheckUser
  2. Set wgCUDMaxAge to 10
  3. Open Google Chrome or Edge
  4. Make an edit to a page
  5. Check that rows exist in the cu_useragent_clienthints_map table
  6. Run SELECT * FROM cu_useragent_clienthints and save the output somewhere for later inspection
  7. Run the purgeOldData.php maintenance script (php maintenance/run.php CheckUser:purgeOldData.php)
  8. Check that no rows exist in the cu_useragent_clienthints_map table
  9. Run SELECT * FROM cu_useragent_clienthints and check that no changes can be seen to the output in step 6.

These steps aim to test that when data expires from the CheckUser tables, only the map rows are deleted. Previously data in cu_useragent_clienthints that became orphaned would be deleted.

GMikesell-WMF subscribed.

@Dreamy_Jazz Rows existed on cu_useragent_clienthints_map. After the purge maintenance script, rows no longer exist on cu_useragent_clienthints_map as seen in the screenshots. Output from `cu_useragent_clienthints ' had no changes before and after purge maintenance script. I will move this to Done. Thanks for all your work!

Status: ✅ PASS
Environment: Local: 1.41.0-alpha (2f2802e) 20:03, 11 September 2023. CheckUser: 2.5 (7402d99) 13:46, 11 September 2023
OS: macOS Ventura
Browser: Chrome 116
Device: MBP
Emulated Device:: N/A
Test Links:
http://localhost:8080/w/index.php?title=Philadelphia_Eagles&action=history

✅AC1: https://phabricator.wikimedia.org/T345591#9155548

Before PurgeAfter Purge
2023-09-12_09-56-04.png (961×385 px, 85 KB)
2023-09-12_09-57-28.png (941×907 px, 169 KB)

Change 971953 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[operations/mediawiki-config@master] CheckUser: Set 'debug' log level

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

Change 971953 merged by jenkins-bot:

[operations/mediawiki-config@master] CheckUser: Set 'debug' log level

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

Mentioned in SAL (#wikimedia-operations) [2023-11-06T14:08:12Z] <urbanecm@deploy2002> Started scap: Backport for [[gerrit:971953|CheckUser: Set 'debug' log level (T345591)]]

Mentioned in SAL (#wikimedia-operations) [2023-11-06T14:22:33Z] <urbanecm@deploy2002> Finished scap: Backport for [[gerrit:971953|CheckUser: Set 'debug' log level (T345591)]] (duration: 14m 20s)

Change 972722 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[operations/mediawiki-config@master] Revert "CheckUser: Set 'debug' log level"

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

Change 972722 merged by jenkins-bot:

[operations/mediawiki-config@master] Revert "CheckUser: Set 'debug' log level"

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

Mentioned in SAL (#wikimedia-operations) [2023-11-09T14:34:09Z] <kharlan@deploy2002> Started scap: Backport for [[gerrit:972722|Revert "CheckUser: Set 'debug' log level" (T345591)]]

Mentioned in SAL (#wikimedia-operations) [2023-11-09T14:35:41Z] <kharlan@deploy2002> kharlan and dreamyjazz: Backport for [[gerrit:972722|Revert "CheckUser: Set 'debug' log level" (T345591)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2023-11-09T14:41:53Z] <kharlan@deploy2002> Finished scap: Backport for [[gerrit:972722|Revert "CheckUser: Set 'debug' log level" (T345591)]] (duration: 07m 43s)