Skip Menu |

This queue is for tickets about the Cache-Memcached-Fast CPAN distribution.

Report information
The Basics
Id: 42473
Status: rejected
Priority: 0/
Queue: Cache-Memcached-Fast

People
Owner: Nobody in particular
Requestors: DEEPFRYED [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.13
Fixed in: (no value)



Subject: fails to remove dead servers from loop on initialize
The client lib does not remove dead servers from the loop when trying to store data. this causes consistent failures in storing data that's distributed by the hashing mechanism to those servers. I hope this can get fixed soon since everything else rocks, this issue is proving to be a show stopper. Thanks
Subject: removes_dead_hosts_from_loop.t
#!/usr/bin/perl use strict; use warnings; use Test::More tests => 2; use Cache::Memcached; use Cache::Memcached::Fast; my $config = { servers => [ '127.0.0.1:11211', '127.0.0.1:11212', # non-existent '127.0.0.1:11213', # non-existent ], }; my $simple = Cache::Memcached->new($config); my $fast = Cache::Memcached::Fast->new($config); # expect first time failures. $simple->set($_, $_) for 1..100; # second time the failed servers should not be used. $simple->set($_, $_) for 1..100; is_deeply( [ map { $simple->get($_) } (1..100) ], [ 1..100 ], 'Cache::Memcached removes failed servers from loop' ); $simple->flush_all; # expect first time failures. $fast->set($_, $_) for 1..100; # second time the failed servers should not be used. $fast->set($_, $_) for 1..100; is_deeply( [ map { $fast->get($_) } (1..100) ], [ 1..100 ], 'Cache::Memcached::Fast removes failed servers from loop' );
Please read http://search.cpan.org/dist/Cache-Memcached-Fast/lib/Cache/Memcached/Fast.pm#Constructor_parameters on the absence of no_rehash parameter (you may also look into this thread: http://lists.danga.com/pipermail/memcached/2008-June/007026.html). To implement automatic reconfiguration, you may run a separate script that monitors the servers (for instance, with server_versions() call). When some server appears to be down, you should _atomically_ reset C::M::F to the new server list. This is tricky. Or the script should simply try to restart failed memcached server.
On Sat Jan 17 07:29:51 2009, KROKI wrote: Show quoted text
> When some server appears to be down, you should _atomically_ reset > C::M::F to the new server list. This is tricky.
I mean _atomically_ in _all_ clients. Otherwise consistency problem would arise.