Page MenuHomePhabricator

Remove cx_drafts table from production
Closed, ResolvedPublic

Description

Remove cx_drafts table from production since T169171 is done.

Event Timeline

You might want to take dump of the table first and store somewhere secure.

Yes. That's generally done by DBA before such operation.

Marostegui subscribed.

Thanks for the ticket - we will take it from here

Removed cx_drafts from Labs instances and it is OK.

Removed cx_drafts from Labs instances and it is OK.

What do you mean with removed from labs instances?

What do you mean with removed from labs instances?

Just to double check if everything is fine under Labs too. Nothing to worry or affects Production :)

What do you mean with removed from labs instances?

Just to double check if everything is fine under Labs too. Nothing to worry or affects Production :)

But did you actually drop the tables from the labs databases?
Sorry for asking so much, but I really want to understand what has been done :-)

But did you actually drop the tables from the labs databases?
Sorry for asking so much, but I really want to understand what has been done :-)

Yes. Dropped cx_drafts in Labs (cx-testing.wmflabs.org/cx2-testing.wmflabs.org instances of ContentTranslation).

I have checked and this table does not exist on any of the production masters.

jcrespo subscribed.

Sorry?

root@db1031[wikishared]> SHOW TABLES;
+----------------------+
| Tables_in_wikishared |
+----------------------+
| bounce_records       |
| cx_corpora           |
| cx_drafts            |
| cx_lists             |
| cx_suggestions       |
| cx_translations      |
| cx_translators       |
| echo_unread_wikis    |
| urlshortcodes        |
+----------------------+
9 rows in set (0.00 sec)

Sorry?

root@db1031[wikishared]> SHOW TABLES;
+----------------------+
| Tables_in_wikishared |
+----------------------+
| bounce_records       |
| cx_corpora           |
| cx_drafts            |
| cx_lists             |
| cx_suggestions       |
| cx_translations      |
| cx_translators       |
| echo_unread_wikis    |
| urlshortcodes        |
+----------------------+
9 rows in set (0.00 sec)

Only checked sX not x1, good one.

Mentioned in SAL (#wikimedia-operations) [2017-08-16T15:35:57Z] <marostegui> Rename cx_drafts table on db1029 - T172364

I have renamed the table on db1029 and will leave it like that for a few days to make sure nothing complains/breaks

root@db1029[wikishared]> rename table cx_drafts to T172364_cx_drafts;
Query OK, 0 rows affected (0.09 sec)

To revert:

set session sql_log_bin=0;
rename table T172364_cx_drafts to cx_drafts;

I did some random checks and draft loading in ContentTranslation seems OK.

I did some random checks and draft loading in ContentTranslation seems OK.

Great - thanks.
Let's leave it like that for a couple of days before dropping it for good

By the way, I have backed up this table at:

dbstore1001:/srv/tmp/T172364/cx_drafts.sql

Mentioned in SAL (#wikimedia-operations) [2017-08-21T07:42:32Z] <marostegui> Drop cx_drafts table from x1 - T172364

cx_drafts table has been dropped on the master.