Last modified: 2011-04-14 15:10:38 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 T24332, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 22332 - MW memcached driver should fall back to PHP's built-in memcached module if available
MW memcached driver should fall back to PHP's built-in memcached module if av...
Status: NEW
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.16.x
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-01-31 15:26 UTC by Roan Kattouw
Modified: 2011-04-14 15:10 UTC (History)
3 users (show)

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


Attachments

Description Roan Kattouw 2010-01-31 15:26:19 UTC
Presumably, PHP's memcached module (which caused the memcached class to be renamed to MWMemcached because of a naming conflict) is faster than our PHP implementation and supports the same actions.

We should write a wrapper class around the built-in memcached class that coexists with MWMemcached and have wfGetCache() choose which one to instantiate based on class_exists('memcached') .

In the longer term, we should rewrite this horrible infrastructure and have all cache interface classes inherit one abstract class, and move wfGetCache()'s functionality to a static method in that abstract class. We could also have each cache interface class implement isAvailable() so we can move the class_exists('memcached') check to a more logical place.
Comment 1 Tim Starling 2010-02-02 06:50:56 UTC
Yes, fine, but it's unlikely the PECL client supports the same hash function (an MD5 hash truncated to 31 bits then modulo the server count), so deployment may be tricky.
Comment 2 Roan Kattouw 2010-02-02 13:18:17 UTC
(In reply to comment #1)
> Yes, fine, but it's unlikely the PECL client supports the same hash function
> (an MD5 hash truncated to 31 bits then modulo the server count), so deployment
> may be tricky.

I'm not saying we should deploy it on Wikimedia (although, if it really is faster, we may want to), just that we should offer this functionality to third-party users. If migrating an existing server farm from one to the other causes issues, perhaps we should have separate cache types for the two so you can configure MW to use the PHP-based client even if the module-based one is available.

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


Navigation
Links