Closed vsespb closed 10 years ago
thank you for your bug report. i fixed it and push into https://github.com/shogo82148/Redis-Fast/compare/fix-issue-9-avoid-double-free . check it out please.
It looks like problem fixed, but behaviour of module changed
$ perl 1.pl
0.05
NORMAL EXIT
$ perl -Iblib/lib -I blib/arch 1.pl
0.08
Error while reading from Redis server: Connection timed out at blib/lib/Redis/Fast.pm line 178.
$ cat 1.pl
use strict;
use warnings;
use Redis::Fast;
print Redis::Fast->VERSION(), "\n";
my $redis = Redis::Fast->new(server => 'localhost:6379', reconnect=>1, cnx_timeout => 0.2, read_timeout => 0.3);
$redis->blpop("notakey", 3);
print "NORMAL EXIT\n";
previously blpop timeout was in priority over read_timeout. now it timeouts after readtimeout. I suspect it can brake backward compatibility.
also, does not fix #10
Redis::Fast 0.08 supports cnx_timeout
and read_timeout
while 0.05 does not.
so, it is expected behavior that 0.08 reports an exception while 0.05 does not if timeout options are passed.
Redis.pm reports an exception in this case. (error message is a little different, but i don't know how to fix it :( it's feature work.)
use strict;
use warnings;
use Redis;
my $redis = Redis->new(server => 'localhost:6379', reconnect=>1, cnx_timeout => 0.2, read_timeout => 0.3);
$redis->blpop("notakey", 1);
Error while reading from Redis server: Resource temporarily unavailable at /home/ichinose/.plenv/versions/5.14.3/lib/perl5/site_perl/5.14.3/Redis.pm line 267.
Ok, thank you. LGTM then.
reproduced on two servers. and it seems that
0.05
works fine. we rolled back and all fine now.