Page MenuHomePhabricator

Drop phabricator_search.search_documentfield_BKUP table
Closed, ResolvedPublic

Description

While looking into some Phabricator search anomalies, I stumbled upon the phabricator_search.search_documentfield_BKUP table in MariaDB on phab1004.
I could not find any pointers why and when that table got renamed (no pointers in T146673 or T156373 which I guess are most related.

In my understanding, rPHAB719dd6d3f44245e935b21291a59338a819938c49 should have dropped that entire phabricator_search.search_documentfield table anyway.
Which likely did not happen in our installation due to that earlier table rename, I assume?

(Note to my future self: Docs about this on https://we.phorge.it/book/contrib/article/database/ are incorrect per https://we.phorge.it/Q82)

Event Timeline

Aklapper created this task.

@brennen: I assume you don't remember any details either? (Which is fine ofc. Just wondering.)

Offhand, I don't remember anything about this one. If @20after4 happens to see this, he might remember specifics... I'm guessing it's probably safe to drop by now.

@Aklapper just to make sure we are on the same page, you mentioned phab1004, but the table is on db1213 (the database) or there's a backup file there in phab1004 too?
I wasn't able to find that one.

Regarding the database one, the table seems to be from 2022

root@db1213:/srv# find . | grep search_documentfield_BKUP -i | xargs ls -lh
-rw-rw---- 1 mysql mysql 1.3K Sep 23  2022 ./sqldata/phabricator_search/search_documentfield_BKUP.frm
-rw-rw---- 1 mysql mysql 1.3G Sep 23  2022 ./sqldata/phabricator_search/search_documentfield_BKUP.ibd

If you want me to take a backup of it (to a text file) and drop it, we can also do that.

Sorry, I just have been clearer in my choice of words. I only ssh into phab1004, you are very likely completely right about it using db1213. :)

If you want me to take a backup of it (to a text file) and drop it, we can also do that.

In my (so far very limited) understanding of Phab's Search we will not need a backup as that's a now unused (as in "no code exists anymore to ever read it") index of some search terms.

It is also very likely it was renamed (and not removed) to see if anything would break and if nothing broke it does probably means it is safe to drop (if the data isn't needed).

Mentioned in SAL (#wikimedia-operations) [2025-03-06T10:16:10Z] <marostegui> Drop phabricator_search.search_documentfield_BKUP T387174

cumin2024@db1213.eqiad.wmnet[phabricator_search]> drop table if exists search_documentfield_BKUP;
Query OK, 0 rows affected (0.007 sec)


cumin2024@db1213.eqiad.wmnet[phabricator_search]> show tables like '%BKUP%';
Empty set (0.001 sec)


cumin2024@db1213.eqiad.wmnet[phabricator_search]> show tables like '%search_documentfield%';
Empty set (0.001 sec)
root@db1213:/srv# find . | grep search_documentfield_BKUP -i | xargs ls -lh
total 12K
drwxr-xr-x 65 mysql mysql 8.0K Mar  6 09:21 sqldata
drwxr-xr-x  2 mysql mysql    6 Mar  6 10:19 tmp
root@db1213:/srv#