Skip Menu |

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

Report information
The Basics
Id: 45560
Status: resolved
Priority: 0/
Queue: Cache-Memcached

People
Owner: Nobody in particular
Requestors: dst [...] heise.de
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.24
Fixed in: (no value)



Subject: disconnect_all does not clear @buck2sock
The list @buck2suck is not cleared when disconnect_all() is called. If you use more than one memcached server references to stale sockets stay in the list, which cause Cache::Memcached to die with the message No sock found for server1:11211 at /usr/share/perl5/Cache/Memcached.pm line 672 on the next call to get(). This code triggers the bug: #!/usr/bin/perl use Cache::Memcached; my $memd = Cache::Memcached->new( { servers => [ 'server1:11211', 'server2:11211' ], } ); $memd->get( 'some_key' ); $memd->disconnect_all; $memd->get( 'some_key' ); Fix attached.
Subject: c-m-no-sock-fix.diff
--- Memcached.pm 2009-04-29 16:27:49.000000000 +0200 +++ Memcached.pm.fixed 2009-04-29 16:27:56.000000000 +0200 @@ -328,6 +328,7 @@ close $sock; } %cache_sock = (); + @buck2sock = (); } # writes a line, then reads result. by default stops reading after a
Fixed in 1.25. Thanks!