Lucas_Werkmeister_WMDE created this task.
Lucas_Werkmeister_WMDE added projects: Wikidata, Wikidata Analytics.
TASK DESCRIPTION
The `site_stats` table is now “sharded” (but still on a single node, even in
a single table, just split across multiple rows). Several scripts in
`analytics/wmde/scripts.git` query this table and assume a single row;
specifically:
name=good_articles.php
$result = $pdo->query( 'select ss_good_articles from
wikidatawiki.site_stats' );
name=total_edits.php
$result = $pdo->query( 'select ss_total_edits from wikidatawiki.site_stats'
);
name=total_pages.php
$result = $pdo->query( 'select ss_total_pages from wikidatawiki.site_stats'
);
name=users.php
$result = $pdo->query( 'select ss_users from wikidatawiki.site_stats' );
All of these just send `$rows[0]['ss_field_name']` to Grafana, and MariaDB
happens to return the first row first:
MariaDB [wikidatawiki]> select ss_total_pages from wikidatawiki.site_stats;
+----------------+
| ss_total_pages |
+----------------+
| 102160147 |
| 7267 |
| 7207 |
| 7265 |
| 7140 |
| 7162 |
| 7266 |
| 7190 |
| 7197 |
| 7238 |
+----------------+
10 rows in set (0.001 sec)
So as long as MariaDB keeps returning the rows in this order, the scripts
still record a roughly accurate number. However, we still need to fix the
scripts to actually report the sum of all the rows; the longer we wait, the
larger the jump in the graph will be when we finally fix it from “number of
pages/etc. until 2022-05-31 plus one tenth of the number of pages since
2022-05-31” to “total number of pages”.
TASK DETAIL
https://phabricator.wikimedia.org/T310043
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Lucas_Werkmeister_WMDE
Cc: Aklapper, tstarling, Ladsgroup, Krinkle, aaron, Marostegui, Addshore,
Lucas_Werkmeister_WMDE, Astuthiodit_1, karapayneWMDE, Invadibot, maantietaja,
ItamarWMDE, Akuckartz, Nandana, Lahi, Gq86, GoranSMilovanovic, QZanden,
LawExplorer, _jensen, rosalieper, Scott_WUaS, Wikidata-bugs, aude, Mbch331
_______________________________________________
Wikidata-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]