Last modified: 2013-07-12 03:31:03 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 T53156, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 51156 - ParsoidCacheUpdateJob queues htmlCacheUpdate jobs on template edits
ParsoidCacheUpdateJob queues htmlCacheUpdate jobs on template edits
Status: RESOLVED FIXED
Product: Parsoid
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: High major
: ---
Assigned To: Gabriel Wicke
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-11 04:53 UTC by Tim Starling
Modified: 2013-07-12 03:31 UTC (History)
2 users (show)

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


Attachments

Description Tim Starling 2013-07-11 04:53:49 UTC
Every edit results in a ParsoidCacheUpdateJob. Every time a template is edited which has more than 20 pages that use it, ParsoidCacheUpdateJob purges the cache of those pages by queueing htmlCacheUpdate jobs.

This is because ParsoidCacheUpdateJob extends from HTMLCacheUpdateJob. It calls doFullUpdate(), which is not overridden, which calls insertPartitionJobs(), which is also not overridden, which inserts the relevant htmlCacheUpdate jobs. I've confirmed this with strace/eval.php in production.

HTMLCacheUpdateJob was not intended for subclassing. Trying to override almost every method of a class in order to use the remaining behaviour is error-prone. I think you should either derive directly from Job (with some duplication), or factor out an abstract base class which would be common to both HTMLCacheUpdateJob and ParsoidCacheUpdateJob.
Comment 1 Gabriel Wicke 2013-07-11 15:17:47 UTC
Ahh, this confirms the suspicion that I had about why larger template updates never make it to Parsoid. Thank you for figuring this out!

Factoring out the general range splitting functionality from HTMLCacheUpdate and RefreshLinks is something Aaron plans to do afaik. In the meantime I'll either duplicate the range splitting code, or find some other way to make it work while still subclassing.
Comment 2 Gerrit Notification Bot 2013-07-11 23:42:31 UTC
Change 73368 had a related patch set uploaded by GWicke:
Bug 51156: Don't subclass HTMLCacheUpdate any more

https://gerrit.wikimedia.org/r/73368
Comment 3 Gerrit Notification Bot 2013-07-12 01:19:38 UTC
Change 73368 merged by jenkins-bot:
Bug 51156: Don't subclass HTMLCacheUpdate any more

https://gerrit.wikimedia.org/r/73368
Comment 4 Gabriel Wicke 2013-07-12 03:31:03 UTC
The fix should be deployed tomorrow.

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


Navigation
Links