About 6000 every 3 hours I'm seeing
Expectation (writes <= 0) by MediaWiki::restInPeace not met (actual: 3): query-m: INSERT IGNORE INTO `user_properties` (up_user,up_property,up_value) VALUES ('X') [TRX#fc1af7] #0 /srv/mediawiki/php-1.31.0-wmf.5/includes/libs/rdbms/TransactionProfiler.php(219): Wikimedia\Rdbms\TransactionProfiler->reportExpectationViolated() #1 /srv/mediawiki/php-1.31.0-wmf.5/includes/libs/rdbms/database/Database.php(1037): Wikimedia\Rdbms\TransactionProfiler->recordQueryCompletion() #2 /srv/mediawiki/php-1.31.0-wmf.5/includes/libs/rdbms/database/Database.php(937): Wikimedia\Rdbms\Database->doProfiledQuery() #3 /srv/mediawiki/php-1.31.0-wmf.5/includes/libs/rdbms/database/Database.php(1608): Wikimedia\Rdbms\Database->query() #4 /srv/mediawiki/php-1.31.0-wmf.5/includes/user/User.php(5423): Wikimedia\Rdbms\Database->insert() #5 /srv/mediawiki/php-1.31.0-wmf.5/includes/user/User.php(4061): User->saveOptions() #6 /srv/mediawiki/php-1.31.0-wmf.5/extensions/MobileFrontend/includes/specials/SpecialMobileWatchlist.php(87): User->saveSettings() #7 /srv/mediawiki/php-1.31.0-wmf.5/includes/deferred/MWCallableUpdate.php(30): Closure$SpecialMobileWatchlist::executeWhenAvailable() #8 /srv/mediawiki/php-1.31.0-wmf.5/includes/deferred/DeferredUpdates.php(259): MWCallableUpdate->doUpdate() #9 /srv/mediawiki/php-1.31.0-wmf.5/includes/deferred/DeferredUpdates.php(210): DeferredUpdates::runUpdate() #10 /srv/mediawiki/php-1.31.0-wmf.5/includes/deferred/DeferredUpdates.php(131): DeferredUpdates::execute() #11 /srv/mediawiki/php-1.31.0-wmf.5/includes/MediaWiki.php(897): DeferredUpdates::doUpdates() #12 /srv/mediawiki/php-1.31.0-wmf.5/includes/MediaWiki.php(719): MediaWiki->restInPeace() #13 (): Closure$MediaWiki::doPostOutputShutdown() #14 {main}
As Timo points out a GET request is supposed to be idempotent
I'm not sure if this will resolve the logstash issue, but moving this code to JS, seems like a sane thing to do. The stickiness of the tab is not the most important of features and could be done in the client after inspecting the value mw.user.options.get('mfWatchlistView') and comparing it to the current view.
Options:
- Remove feature SpecialMobileWatchlist::updateStickyTabs and surrounding code
- Add logic to client-side instead.
mw.loader.using('mediawiki.api.options').done( () => { new mw.Api().saveOption('mfWatchlistView', 'a-z') } )
- Make view switch a form with button instead of link. (See T179445#3725385 for other benefits, and proposal by @Krinkle)