Closed Bug 1189281 Opened 9 years ago Closed 9 years ago

Use Cache::Memcached::Fast instead of Cache::Memcached

Categories

(Bugzilla :: Installation & Upgrading, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 6.0

People

(Reporter: gerv, Assigned: lbearl)

References

Details

(Keywords: relnote)

Attachments

(1 file)

Bugzilla supports Memcached via Cache::Memcached, which is written in Perl. However, there's a Cache::Memcached::Fast which is written in C and therefore, presumably faster. It also apparently supports Windows. We should investigate whether we should switch to either support both, or just support ::Fast.

Gerv
Severity: normal → enhancement
I have modified the Bugzilla code in use by my employer in order to use Cache::Memcahced::Fast and so far it is working perfectly on Win32 (but I can't speak for its compatibility with other platforms). I did this due to the fact that the standard Cache::Memcached that Bugzilla attempts to install would fail various tests when being installed, and even after installing with skipping the tests was non-operational.  Just for fun I decided to try out ::Fast since its documentation indicated that it is mostly API compatible with Cache::Memcached, and it appears that the functions bugzilla uses are completely compatible.

Let me know if there are any specific questions.
Adding the git-patch I created if anyone wants to quickly make the same changes I did.
Attachment #8641325 - Flags: review?(dylan)
Assignee: general → lbearl
Status: NEW → ASSIGNED
Component: Bugzilla-General → Installation & Upgrading
Summary: Investigate use of Cache::Memcached::Fast → Use Cache::Memcached::Fast instead of Cache::Memcached
I would suggest looking into https://metacpan.org/pod/CHI.
(In reply to Dylan William Hardison [:dylan] from comment #3)
> I would suggest looking into https://metacpan.org/pod/CHI.

Even if using CHI, the decision would need to be made between the three memcached drivers it supports: Cache::Memcached, Cache::Memcached::Fast, and Cache::Memcached::libmemcached. 

Cache::Memcached can be disqualified immediately if Windows support is needed, ::Fast is known to work with Windows and from looking at the CPAN tester report it works across most other platforms bugzilla supports.  Cache::Memcached::libmemcached appears to be non-operational in CHI currently (see: https://rt.cpan.org/Public/Bug/Display.html?id=89697). 

This brings us full circle back to whether or not to use ::Fast, although with the suggestion of CHI, ::Fast would still need to be used, it would just be abstracted away.
Comment on attachment 8641325 [details] [diff] [review]
win32_fast_memcached_fix.patch

Review of attachment 8641325 [details] [diff] [review]:
-----------------------------------------------------------------

r=dylan 

this code works, but it means we depend on an XS module (which is sometimes more trouble). But as a reviewer is only reviewing the content of the code
and not the directionality of the project, this looks fine to me.
Attachment #8641325 - Flags: review?(dylan) → review+
(In reply to Luke Bearl from comment #4)
> (In reply to Dylan William Hardison [:dylan] from comment #3)
> > I would suggest looking into https://metacpan.org/pod/CHI.
> This brings us full circle back to whether or not to use ::Fast, although
> with the suggestion of CHI, ::Fast would still need to be used, it would
> just be abstracted away.

CHI can also let you plug in Cache::FastMmap -- which is quite fast and would be a useful direction to go in for non-CGI bugzillas.
Flags: approval?
Flags: approval? → approval+
Target Milestone: --- → Bugzilla 6.0
Keywords: relnote
The changelog says that you need at least version 0.17 (release date: 2009-11-02) to work with memcached 1.3.2 or newer. Current release of memcached is 1.4.24. I would suggest that the min version be bumped to 0.17 to avoid incompatibilities.
gerv: agree to require 0.17 based on comment 7? If yes, please fix that on checkin.
Flags: needinfo?(gerv)
To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git
   3db657e..194ed92  master -> master

Luke: thanks so much for the patch. Your contributions are appreciated :-)

Gerv
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Flags: needinfo?(gerv)
Resolution: --- → FIXED
To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git
   141d0d9..d7b46a6  master -> master

fixes comment 7. Oops.

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

Attachment

General

Creator:
Created:
Updated:
Size: