Page MenuHomePhabricator

enwiki_p query returned empty results on May 14 from ~UTC 0:00 - 05:00
Closed, InvalidPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

Unknown

What happens?:

Our bot, WP 1.0, started misbehving during it's May 14 run. See discussion on-wiki here.

Basically, the bot started deleting all of it's own data and creating "empty" tables. The root cause seems to be that the following SQL query completed without errors, but returned an empty result set:

SELECT page_namespace, page_title, page_id, cl_sortkey, cl_timestamp
FROM page
JOIN categorylinks ON page_id = cl_from
WHERE cl_to = 'A-Class_Austria_articles'

When the bot was re-run about 16 hours later, everything worked as expected.

What should have happened instead?:

The query should have returned the expected result set.

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

N/A

Other information (browser name/version, screenshots, etc.):

Codebase: https://github.com/openzim/wp1

Event Timeline

Your SQL indicates you want all category member of that category, but https://en.wikipedia.org/wiki/Category:A-Class_Austria_articles has no articles in it.

It is valid to return an empty result in this case (assuming the namespace filter with page_namespace = 0 is used as well)
The task description does not include an example, what page is expected in the result set, so no further analyse is possible.

It has the talk page articles in it, which is what we are looking for (WP 1.0 articles are categorized on their talk pages, not their article pages).

MariaDB [(none)]> use enwiki_p;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
MariaDB [enwiki_p]> SELECT page_namespace, page_title, page_id, cl_sortkey, cl_timestamp
    -> FROM page
    -> JOIN categorylinks ON page_id = cl_from
    -> WHERE cl_to = 'A-Class_Austria_articles';
+----------------+------------------------------------+----------+-----------------------------------------------------------------------------------------------------+---------------------+
| page_namespace | page_title                         | page_id  | cl_sortkey                                                                                          | cl_timestamp        |
+----------------+------------------------------------+----------+-----------------------------------------------------------------------------------------------------+---------------------+
|              1 | U-20-class_submarine               | 20155075 | R.@*NNNR,B*L:D2�                                                                          | 2010-11-23 09:35:08 |
|              1 | SM_U-5_(Austria-Hungary)           | 20396618 | NBR	�*RNPL:*8RD6*LZ	������ܿ�
                                                                                                                                                                   | 2010-11-23 09:35:34 |
|              1 | Battle_of_Emmendingen              | 27476790 | ,*PP@2F42BB2D0:D62Dܽ�                                                                          | 2024-03-24 20:38:38 |
|              1 | U-5-class_submarine                | 20047380 | R.@*NNNR,B*L:D2�                                                                          | 2024-08-15 05:33:55 |
|              1 | U-3-class_submarine                | 20211751 | R.@*NNNR,B*L:D2�                                                                          | 2024-08-15 05:34:00 |
|              1 | Egmont_Prinz_zur_Lippe-Weißenfeld  | 22819762 | @:HH2V2:NN2D42@0HL:D\26BFDP\RL26BFDPHL:D\\RL@:HH2V2:NN2D42@0%)p
                    �����������ܽ�����
                   | 2024-09-12 15:40:44 |
|              1 | Ersatz_Monarch-class_battleship    | 13615711 | 2LN*P\BFD*L.8.@*NN,*PP@2N8:H#��� 2024-09-16 11:42:26 |
|              1 | Johann_Heinrich_von_Schmitt        | 26092761 | N.8B:0P<F8*DD82:DL:.8TFD<F8*DD82:DL:.8TFDN.8B:PP%��ܾ����ܺ�
                                   | 2024-09-20 10:33:50 |
                                                                         | 2024-09-20 10:34:48 |
|              1 | Battle_of_Marengo                  |  1886856 | ,*PP@2F4B*L2D6Fܽ�
                                                                              | 2025-05-13 09:54:27 |
|              1 | Gordon_Gollob                      |  5486536 | 6F@@F,6FL0FD6FL0FD6F@@F, ܿ�����	                                                                  | 2025-05-14 05:59:32 |
|              1 | Walter_Nowotny                     |  5542962 | DFVFPDZV*@P2LV*@P2LDFVFPDZ"ܾ�����
                                                                | 2025-05-14 06:15:57 |
+----------------+------------------------------------+----------+-----------------------------------------------------------------------------------------------------+---------------------+
12 rows in set (0.014 sec)
taavi subscribed.

There are essentially three reasons that could cause this issue:

  • The view configuration being temporarily changed to not show those rows. Given a lack of changes to the config file we can rule this out.
  • A MediaWiki issue removing those rows from the databases and then inserting them back some time later. This seems like something that would've been noticed by other users of the wikis and is also not something the cloud-services-team is equipped to debug.
  • An issue in your tool causing an error to be misinterpreted as success.

Unfortunately I'm not really seeing anything here that suggests an issue on the wiki replicas that we could investigate or prevent in the future somehow, so closing.

Thank you for carefully considering the issue. There haven't been any recent code changes in the tool so I'm stumped. I'll keep debugging.