T222310: [EPIC] Positive reinforcement: New Impact Module involves showing aggregated pageview data to users so they can understand the positive impact they make on Wikipedia. This currently takes two forms:
- a maintenance script (refreshUserImpactData.php) to cache pageview data of all articles the user has edited, for users who are in the target audience (users who have registered in the last two weeks, or registered in the last year and edited within the last two weeks)
- on-demand fetching the same data on a cache miss when a user visits Special:Homepage or Special:Impact
Fetching happens via the PageViewInfo extension which has a per-page cache, and applies some resource limits (it favors returning incomplete data over making many AQS requests from a single PHP request). Due to how the code is structured, those limits are applied to the data fetched for a single user, but not in total, so we want to make sure we don't generate a volume of requests that causes stress on AQS.
Test plan: run /home/tgr/T323958-deploy-newimpact/refreshUserImpactData.php (the master version of the refreshUserImpactData.php maintenance script from the GrowthExperiments extension, which has some helpful flags not yet present in wmf.10) on mwmaint1002 without the --use-job-queue option, first on a random small wiki (let's say akwiki), then on a random medium wiki (let's say abwiki), then on the pilot wikis from smallest to largest (bnwiki, cswiki, arwiki, eswiki) and watch the stats. After the deployment on Thursday, re-run on the pilot wikis with the --use-job-queue flag.
For the general deployment plan, see T222310#deployment-plan.
Emergency switch:
- Before the Thursday post-train backport window: just kill the script. All it does is cache warming, can be safely interrupted.
- After the Thursday post-train backport window
- To disable the maintenance script, set the $wgGERefreshUserImpactDataMaintenanceScriptEnabled MediaWiki config variable to false.
- To disable on-demand data loading, set the $wgGEUseNewImpactModule MediaWiki config variable to false.
Monitoring:
- The PageViews section of the AQS dashboard
- PageViewInfo logstash logs
- cassandra-aqs logstash logs
Progress:
- time mwscript /home/tgr/T323958-deploy-newimpact/refreshUserImpactData.php akwiki --registeredWithin=2week --hasEditsAtLeast=3 --force --verbose | tee refreshUserImpactData.akwiki.1.log
- time mwscript /home/tgr/T323958-deploy-newimpact/refreshUserImpactData.php akwiki --registeredWithin 1year --editedWithin 2week --hasEditsAtLeast=3 --force --verbose | tee refreshUserImpactData.akwiki.2.log
- time mwscript /home/tgr/T323958-deploy-newimpact/refreshUserImpactData.php abwiki --registeredWithin=2week --hasEditsAtLeast=3 --force --verbose | tee refreshUserImpactData.abwiki.1.log
- time mwscript /home/tgr/T323958-deploy-newimpact/refreshUserImpactData.php abwiki --registeredWithin 1year --editedWithin 2week --hasEditsAtLeast=3 --force --verbose | tee refreshUserImpactData.abwiki.2.log
- time mwscript /home/tgr/T323958-deploy-newimpact/refreshUserImpactData.php bnwiki --registeredWithin=2week --hasEditsAtLeast=3 --force --verbose | tee refreshUserImpactData.bnwiki.1.log
- time mwscript /home/tgr/T323958-deploy-newimpact/refreshUserImpactData.php bnwiki --registeredWithin 1year --editedWithin 2week --hasEditsAtLeast=3 --force --verbose | tee refreshUserImpactData.bnwiki.2.log
- time mwscript /home/tgr/T323958-deploy-newimpact/refreshUserImpactData.php cswiki --registeredWithin=2week --hasEditsAtLeast=3 --force --verbose | tee refreshUserImpactData.cswiki.1.log
- time mwscript /home/tgr/T323958-deploy-newimpact/refreshUserImpactData.php cswiki --registeredWithin 1year --editedWithin 2week --hasEditsAtLeast=3 --force --verbose | tee refreshUserImpactData.cswiki.2.log
- time mwscript /home/tgr/T323958-deploy-newimpact/refreshUserImpactData.php arwiki --registeredWithin=2week --hasEditsAtLeast=3 --force --verbose | tee refreshUserImpactData.arwiki.1.log
- time mwscript /home/tgr/T323958-deploy-newimpact/refreshUserImpactData.php arwiki --registeredWithin 1year --editedWithin 2week --hasEditsAtLeast=3 --force --verbose | tee refreshUserImpactData.arwiki.2.log
- time mwscript /home/tgr/T323958-deploy-newimpact/refreshUserImpactData.php eswiki --registeredWithin=2week --hasEditsAtLeast=3 --force --verbose | tee refreshUserImpactData.eswiki.1.log
- time mwscript /home/tgr/T323958-deploy-newimpact/refreshUserImpactData.php eswiki --registeredWithin 1year --editedWithin 2week --hasEditsAtLeast=3 --force --verbose | tee refreshUserImpactData.eswiki.2.log