Hello.
I see strange behavior when work with transaction as follows:
Example:
my $listName = 'testList';
$redis->multi()
$redis->lrange($listName,0,-1); # read all list entires
$redis->ltrim($listName,1,0); # clear list
my $res = $redis->exec();
The $res must have next structure:
[
[ # result for LRANGE command
item,
item,
...
],
OK # result for LTRIM command
]
And this is true if the list exists and contains at least one element. But when list is empty or not exist the exec() method
return empty list -> [], and next command executed with this redis instance return the 'OK' - so it seems that RedisDB did not properly
handle last "multi-answer" from redis server.
Hello. I see strange behavior when work with transaction as follows:
Example:
my $listName = 'testList'; $redis->multi() $redis->lrange($listName,0,-1); # read all list entires $redis->ltrim($listName,1,0); # clear list my $res = $redis->exec();
The $res must have next structure: [ [ # result for LRANGE command item, item, ... ], OK # result for LTRIM command ] And this is true if the list exists and contains at least one element. But when list is empty or not exist the exec() method return empty list -> [], and next command executed with this redis instance return the 'OK' - so it seems that RedisDB did not properly handle last "multi-answer" from redis server.