Last modified: 2014-05-25 05:55:18 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T67058, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 65058 - API should allow for easy bulk clearing of watchlist
API should allow for easy bulk clearing of watchlist
Status: PATCH_TO_REVIEW
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
unspecified
All All
: High normal with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: 13250
  Show dependency treegraph
 
Reported: 2014-05-09 09:59 UTC by Brion Vibber
Modified: 2014-05-25 05:55 UTC (History)
9 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Brion Vibber 2014-05-09 09:59:27 UTC
For bots doing large numbers of edits, it's easy to accumulate a huge watchlist. I've received a request for an API method to bulk-clear a watchlist.

See also bug 13250 which requests a UI method for this.
Comment 1 Gerrit Notification Bot 2014-05-09 10:24:15 UTC
Change 132378 had a related patch set uploaded by Brion VIBBER:
Add API action=watchlistclear to bulk-clear watchlist.

https://gerrit.wikimedia.org/r/132378
Comment 2 Umherirrender 2014-05-09 15:08:09 UTC
a bot can change its preference or set watchlist=nochange to avoid adding a page to the watchlist on each edit. Than there is not a high need of a bulk-clear.

But having a bulk-clear on the api side is a valid feature request. It is also possible to add a param to action=watch to avoid a new module.
Comment 3 Brad Jorsch 2014-05-09 19:30:24 UTC
Try action=watch&unwatch=&token=ABC123&generator=watchlistraw&gwrlimit=max now that action=watch supports generators? ;)
Comment 4 Gerrit Notification Bot 2014-05-09 20:41:08 UTC
Change 132378 merged by jenkins-bot:
Add API action=watch 'entirewatchlist' param to bulk-clear watchlist.

https://gerrit.wikimedia.org/r/132378
Comment 5 Brad Jorsch 2014-05-09 20:42:26 UTC
This should be deployed to WMF wikis with 1.24wmf5, see https://www.mediawiki.org/wiki/MediaWiki_1.24/Roadmap for the schedule.
Comment 6 MZMcBride 2014-05-13 03:58:14 UTC
(In reply to Gerrit Notification Bot from comment #4)
> Change 132378 merged by jenkins-bot:
> Add API action=watch 'entirewatchlist' param to bulk-clear watchlist.
> 
> https://gerrit.wikimedia.org/r/132378

Looks to have been reverted by <https://gerrit.wikimedia.org/r/133046>. Tentatively re-opening this bug report.
Comment 7 Andre Klapper 2014-05-13 07:34:01 UTC
Wondering what the revert means for bug 13250 (UI part).
Comment 8 Brad Jorsch 2014-05-13 15:14:20 UTC
(In reply to MZMcBride from comment #6)
> Looks to have been reverted by <https://gerrit.wikimedia.org/r/133046>.
> Tentatively re-opening this bug report.

Good move.


Comments made on https://gerrit.wikimedia.org/r/#/c/132378/:

MaxSem wrote:
> The main problem with long watchlist was that at hundreds of thousands members
> they got too huge to operate. If you attempt to delete 100k rows from database
> in one operation it will cause a replication lag.

Springle wrote:
> This is only going to come back and bite us. It will cause replag and possibly
> also affect row-based replication to labs if the transaction size gets too
> large.

I note that going to Special:EditWatchlist/raw, blanking the text box, and submitting will perform the same query (calling SpecialEditWatchlist::clearWatchlist() from SpecialEditWatchlist::submitRaw()).
Comment 9 Max Semenik 2014-05-13 16:53:00 UTC
(In reply to Brad Jorsch from comment #8)
> I note that going to Special:EditWatchlist/raw, blanking the text box, and
> submitting will perform the same query (calling
> SpecialEditWatchlist::clearWatchlist() from
> SpecialEditWatchlist::submitRaw()).

Yeah, however it will happily OOM on really large watchlists, so no harm will be done XD
Comment 10 Amir Ladsgroup 2014-05-17 12:11:23 UTC
(In reply to Brad Jorsch from comment #8)
> (In reply to MZMcBride from comment #6)
> > Looks to have been reverted by <https://gerrit.wikimedia.org/r/133046>.
> > Tentatively re-opening this bug report.
> 
> Good move.
> 
> 
> Comments made on https://gerrit.wikimedia.org/r/#/c/132378/:
> 
> MaxSem wrote:
> > The main problem with long watchlist was that at hundreds of thousands members
> > they got too huge to operate. If you attempt to delete 100k rows from database
> > in one operation it will cause a replication lag.
> 
> Springle wrote:
> > This is only going to come back and bite us. It will cause replag and possibly
> > also affect row-based replication to labs if the transaction size gets too
> > large.
> 
> I note that going to Special:EditWatchlist/raw, blanking the text box, and
> submitting will perform the same query (calling
> SpecialEditWatchlist::clearWatchlist() from
> SpecialEditWatchlist::submitRaw()).
problem happens when you're going to Special:EditWatchlist/raw. It is not possible when you dealing with a superhuge list, loading half of million names takes unimaginably long time, but an API request won't take this much (AFAIK) since there is no need to load the old list
Comment 11 Gerrit Notification Bot 2014-05-25 05:55:15 UTC
Change 135293 had a related patch set uploaded by MaxSem:
WIP Add API action=watch 'entirewatchlist' param to bulk-clear watchlist.

https://gerrit.wikimedia.org/r/135293

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links