Page MenuHomePhabricator

Truncate table cx_suggestions, cx_lists
Closed, ResolvedPublic

Description

I ran old version of script (wmf22) ContentTranslation/scripts/manage-lists.php in testwiki to fill the data. To refill new data, old data from wikishared/cx_suggestions and cx_lists need to remove.

Please document the procedure too.

Event Timeline

KartikMistry assigned this task to jcrespo.
KartikMistry raised the priority of this task from to Needs Triage.
KartikMistry updated the task description. (Show Details)
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 16 2015, 7:24 AM

As a one time update, given the current size an traffic of those tables, and that a DBA can immediately check for metadata locking and other things that could go badly with a DML query, I will run

TRUNCATE TABLE wikishared.cx_suggestions;
TRUNCATE TABLE wikishared.cx_lists;

on x1-master.

For unattended maintenance, tables with continuous read operations or large tables, the usage of runBatchedQuery.php is encouraged, with incremental DELETE...LIMIT. That is safer, (no metadata locking, slower garbage collection, etc), and it is not considered a schema change, just regular maintenace.

I've made a backup of those tables, do I have the green light to run the above command now or does it depend on a code commit?

Please go ahead.

MariaDB [wikishared]> SELECT count(*) FROM cx_suggestions;
+----------+
| count(*) |
+----------+
|        0 |
+----------+
1 row in set (0.00 sec)

MariaDB [wikishared]> SELECT count(*) FROM cx_lists;
+----------+
| count(*) |
+----------+
|        0 |
+----------+
1 row in set (0.00 sec)
jcrespo moved this task from Triage to Done on the DBA board.Sep 16 2015, 7:57 AM
KartikMistry closed this task as Resolved.Sep 16 2015, 8:11 AM
KartikMistry triaged this task as Normal priority.
KartikMistry moved this task from Backlog to Done on the LE-CX6-Sprint 4 board.
Nikerabbit renamed this task from Truncated table cx_suggestions, cx_lists to Truncate table cx_suggestions, cx_lists.Oct 1 2015, 7:54 PM