We should have a script that will backfill the echo_unseen_wikis table instead of waiting on users to trigger cache invalidation through receiving or reading notifications.
|mediawiki/vagrant : master||Backfill echo_unread_wikis table after it is created|
|mediawiki/extensions/Echo : master||Backfill echo_unread_wikis table|
wikishared.echo_unread_wikis table is properly updated for the following cases:
- when a user initiates an action that sends alerts/notifications to another user
- when a recipient of notifications from the previous step marks some(all) messages/alerts
- in flyout or
- go to Notifictions page.
Technically, that is testing the normal flow, not the backfill.
We should be able to test the backfill as part of the MediaWiki-Vagrant stuff. I'm working on a patch for this now (to auto-run it on provision).
@Etonkovidova If you want to test this on MediaWiki-Vagrant:
- DROP the echo_unread_wikis table in the wikishared DB (it will probably only exist if you tested the prior patch in this chain).
- Create whatever notifications you want to test.
- Checkout https://gerrit.wikimedia.org/r/264257
- vagrant provision
It will create and backfill the table. You can also run the script manually at any time if you want.
Sorry, when I posted the above, my brain was stuck on "test the users" mode, since part of the point was to have the PHP app use separated users.
However, the root user still exists (even if the app doesn't use it), so you can do:
I can still add that to MOTD if you think it's useful (there's a manifest, so it can easily be done only if Echo is installed).
Rechecked locally actual backfill action with the steps given by @Mattflaschen
- wikishatred.echo_unread_wikis is created upon Notifcations are triggered
- e.g. euw_user=6 has Alerts form frwiki and Messages from wiki, It is be recorded in wikishatred.echo_unread_wikis as the following:
root@localhost:[wikishared]> select * from echo_unread_wikis;
After euw_user=6 viewed Alerts in frwiki, the table is updated.