Last modified: 2011-09-20 17:40:45 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 T33030, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 31030 - Add a new MW_ constant for long-running scripts.
Add a new MW_ constant for long-running scripts.
Status: NEW
Product: MediaWiki
Classification: Unclassified
Maintenance scripts (Other open bugs)
1.20.x
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-09-20 08:20 UTC by Daniel Friesen
Modified: 2011-09-20 17:40 UTC (History)
1 user (show)

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


Attachments

Description Daniel Friesen 2011-09-20 08:20:40 UTC
r52460 introduced a local cache which could -- in a long-running script -- pollute the information the script is using if a user happens to be renamed while it's running.

We may want to consider adding a new MW_ constant like MW_COMPILED set in the context of a long-running script which would be polluted by caches meant to make requests more efficient. And caching code such as that would disable itself in such a situation.
Comment 1 Brion Vibber 2011-09-20 16:28:26 UTC
That sort of temporary cache (which cannot be cleared by other processes making updates) is probably best done in a very explicit way, such as how LinkBatch and friends are used to batch multiple title lookups.

By explicitly creating and discarding the cache / batch lookup, the calling code is able to declare that it's starting an operation, fit its lookups within a limited time/space, and explicitly disavow it when done so any future operations that do similar things can restart from the then-current database state.

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


Navigation
Links