Page MenuHomePhabricator

MyISAM flaggedrevs_stats tables on several sections
Closed, ResolvedPublic

Description

While working on T288398 I found these MyISAM flaggedrevs related tables on some sections like ruwiki (see full list below):

mysql:root@localhost [information_schema]> select table_name,create_time,update_time from tables where engine='MyISAM' and table_name like 'flagged%';
+--------------------+---------------------+---------------------+
| table_name         | create_time         | update_time         |
+--------------------+---------------------+---------------------+
| flaggedrevs_stats2 | 2013-10-07 11:26:02 | 2013-10-07 11:26:02 |
| flaggedrevs_stats  | 2013-10-07 11:26:02 | 2013-10-07 11:26:02 |
+--------------------+---------------------+---------------------+
2 rows in set (0.003 sec)
mysql:root@localhost [information_schema]> use ruwiki;show create table flaggedrevs_stats2\G show create table flaggedrevs_stats\G
Database changed
*************************** 1. row ***************************
       Table: flaggedrevs_stats2
Create Table: CREATE TABLE `flaggedrevs_stats2` (
  `stat_id` int(10) unsigned NOT NULL DEFAULT 1,
  `ave_review_time` int(10) unsigned NOT NULL DEFAULT 0,
  `med_review_time` int(10) unsigned NOT NULL DEFAULT 0,
  `ave_pending_time` int(10) unsigned NOT NULL DEFAULT 0,
  PRIMARY KEY (`stat_id`)
) ENGINE=MyISAM DEFAULT CHARSET=binary
1 row in set (0.000 sec)

*************************** 1. row ***************************
       Table: flaggedrevs_stats
Create Table: CREATE TABLE `flaggedrevs_stats` (
  `namespace` int(11) NOT NULL DEFAULT 0,
  `total` int(11) NOT NULL DEFAULT 0,
  `reviewed` int(11) NOT NULL DEFAULT 0,
  `synced` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`namespace`)
) ENGINE=MyISAM DEFAULT CHARSET=binary
1 row in set (0.000 sec)

I guess they are just ancient history and they are not updated, so can we drop them?
We should probably check all the otherwikis where we have flaggedrevs enabled.

This table is present on:

  • s1: enwiki
  • s2:
eowiki
idwiki
plwiki
trwiki
  • s3:
alswiki
bewiki
bnwiki
bswiki
de_labswikimedia
dewikiquote
dewiktionary
en_labswikimedia
enwikibooks
enwikinews
eswikinews
fawikinews
flaggedrevs_labswikimedia
frwikinews
hewikisource
hiwiki
iawiki
iswiktionary
kawiki
mkwiki
ptwikinews
ptwikisource
plwikisource
plwiktionary
ruwikiquote
ruwikisource
sqwiki
tawikinews
ukwiktionary
zh_classicalwiki
  • s5: dewiki
  • s6: ruwiki
  • s7:
arwiki
huwiki

Event Timeline

Marostegui moved this task from Triage to Refine on the DBA board.
Marostegui renamed this task from MyISAM flaggedrevs_stats tables on dewiki to MyISAM flaggedrevs_stats tables on ruwiki.Aug 17 2021, 11:27 AM

This table is present on:

s1: enwiki
s2:

eowiki
idwiki
plwiki
trwiki

s3:

alswiki
bewiki
bnwiki
bswiki
de_labswikimedia
dewikiquote
dewiktionary
en_labswikimedia
enwikibooks
enwikinews
eswikinews
fawikinews
flaggedrevs_labswikimedia
frwikinews
hewikisource
hiwiki
iawiki
iswiktionary
kawiki
mkwiki
ptwikinews
ptwikisource
plwikisource
plwiktionary
ruwikiquote
ruwikisource
sqwiki
tawikinews
ukwiktionary
zh_classicalwiki

s5: dewiki
s6: ruwiki
s7:

arwiki
huwiki
Marostegui renamed this task from MyISAM flaggedrevs_stats tables on ruwiki to MyISAM flaggedrevs_stats tables on several sections.Aug 26 2021, 10:34 AM
Marostegui updated the task description. (Show Details)

@aaron you were listed as contact for these tables on T54921 - can you confirm we can just go ahead and drop them on the wikis where they exist?
Thanks!

Looking at the code, the table seems to be used. If dropped, it'll cause https://de.wikipedia.org/wiki/Spezial:Sichtungsstatistik to show basically nothing

Interesting....we should at least convert it to InnoDB

If you ask me, having one table to support just one special page doesn't make any sense but the same goes for basically every line of FlaggedRevs.

@aaron you were listed as contact for these tables on T54921 - can you confirm we can just go ahead and drop them on the wikis where they exist?
Thanks!

The extension uses 'flaggedrevs_statistics', not 'flaggedrevs_stats'. Any 'flaggedrevs_stats' table can be dropped.

oh yeah, that was my bad. Then these tables can be dropped.

Thanks a lot you both! Should the code listed on T289050#7311461 be cleaned up too?

Code-wise they are not used at all. It's either the CSS class (coincidence) or being part the other table (flaggedrevs_statistics) or the sql file that commands dropping them.

Marostegui moved this task from Refine to In progress on the DBA board.

Ok, going to rename the ones in dewiki and leave it for a few days.

Mentioned in SAL (#wikimedia-operations) [2021-08-31T06:06:26Z] <marostegui> Rename flaggedrevs_stats2 and flaggedrevs_stats on dewiki codfw T289050

Mentioned in SAL (#wikimedia-operations) [2021-09-01T09:23:25Z] <marostegui> Drop flaggedrevs_stats and flaggedrevs_stats2 from dewiki T289050

Dropped from s5 dewiki - will give it another day to make sure nothing is broken before proceeding with the rest of wikis

Mentioned in SAL (#wikimedia-operations) [2021-09-02T04:50:32Z] <marostegui> Remove flaggedrevs_stats2 and flaggedrevs_stats on ruwiki - T289050

Mentioned in SAL (#wikimedia-operations) [2021-09-02T07:44:20Z] <marostegui> Remove flaggedrevs_stats2 and flaggedrevs_stats on arwiki - T289050

Mentioned in SAL (#wikimedia-operations) [2021-09-02T07:44:43Z] <marostegui> Remove flaggedrevs_stats2 and flaggedrevs_stats on huwiki - T289050

Mentioned in SAL (#wikimedia-operations) [2021-09-02T08:55:07Z] <marostegui> Remove flaggedrevs_stats2 and flaggedrevs_stats from eowiki,idwiki,plwiki,trwiki - T289050

Mentioned in SAL (#wikimedia-operations) [2021-09-03T07:42:54Z] <marostegui> Remove flaggedrevs_stats2 and flaggedrevs_stats from severak s3 wikis - T289050

Mentioned in SAL (#wikimedia-operations) [2021-09-03T11:42:52Z] <marostegui> Remove flaggedrevs_stats2 and flaggedrevs_stats from enwiki - T289050