Page MenuHomePhabricator

Investigate why skin preference is set to empty string for various users
Closed, ResolvedPublicBUG REPORT

Description

During analysis of T305966 we discovered that various users have somehow got set to a state where their skin is set to empty string in the database. This is not a valid value for the skin preference. This means a call to mw.user.options.get('skin') incorrectly returns empty string (garbage in, garbage out). Yet on French Wikipedia, at time of writing 441002 rows for the skin preference in the preferences table were set to empty string.

Questions to answer

  • How might users have got to this state?
  • How can we prevent it happening in future? Can we add any sort of validation?
  • How can we fix existing rows.

Event Timeline

ovasileva triaged this task as Medium priority.Apr 14 2022, 5:09 PM
Jdlrobson added subscribers: Niharika, Ladsgroup, Tgr.

Thanks @Krinkle for the background. With this in mind, I would rather start from the assumption that this is not a new problem but an old problem (we can revisit that later if it proves incorrect).

According to T54777 in 2013 75% of the skin rows had an empty string as their value severely impacting the index and data size. An attempt to fix this was made in the same year (T54778) but it was declined due to concerns around data loss and only having one full-time DBA. The DBA at the time was quoted as saying "dropping rows like this has 0 effect on both disk space and performance due to fragmentation".

It was reopened in 2018 by @Niharika as these junk rows make data analysis difficult e.g. getting metrics around skins. As this task and related spikes show, this analysis problem is very real - I spent three days debugging a problem due to this.

The task remains open so the question is what to do next and if web sees the value in this (it seems there is value across product mostly for analysis purposes).

I spoke to @Ladsgroup about T54777 and T54778 and he says this is something that needs fixing but he doesn't have the capacity. He tipped me off that @Tgr might also be having a problem with this too, so perhaps there is an opportunity for growth team and web team to tackle this together? Presumably, that would involve writing a new script in http://github.com/wikimedia/mediawiki-extensions-WikimediaMaintenanceScripts and running it.

It looks like this answer to "Investigate why skin preference is set to empty string for various users" has been answered, and the answer is captured in T54777 and T54778, so work on this problem can continue on those tickets.