While investigating T171898: Deleting large watchlist takes > 4 seconds causing rollback due to write time limit, I've noticed that the ClearWatchlist functionality at /wiki/Special:EditWatchlist/clear only removes 50 items, then stops.
The first pass at removing watchlist items succeeds in the first job, but then something fails for the second job, with one of these possibilities
- pushing a new job fails (JobQueueGroup::singleton()->push( new self( $this->getTitle(), $this->getParams() ) );
- The job that's pushed is deduplicated and therefore not run
- $loadbalancer->safeWaitForMasterPos() returns false in one of two locations
- $dbw->getScopedLockAndFlush( $lockKey, __METHOD__, 10 ); returns false
- something else entirely
I can't reproduce this in vagrant, but I can reliably reproduce the issue on enwiki.