Coder Social home page Coder Social logo

redis-clusterrider's People

Contributors

hiratara avatar iph0 avatar plainbanana avatar zhmylove avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

redis-clusterrider's Issues

list vs scalar context lost

Hello,

We are using Redis library for our DEV environment and ClusterRider as a production solution with just simple inheritance. And I found issue in the following code:

    my @fields = qw(data cryptor gzip);
    my %data;
    @data{@fields} = $self->{redis}->hmget($key, @fields);

and on dev environment $self->{redis} is instance of Redis class and in production it's Redis::ClusterRider.

But because of the following code:

$reply = $node->$cmd_method( @{$args} );

We are having bug, because there is force to use scalar context, and Redis returns array reference instead of list.

I reworked our code to use scalar context for both libraries, but it would be great if Redis::ClusterRider also can account wantarray logic.

Redis proxy in non-cluster mode

Running the code with non-clustered Redis leads to exception:

# perl -MRedis::ClusterRider -e 'Redis::ClusterRider->new(startup_nodes=>["127.0.0.1:6379"])'
[cluster_info] ERR This instance has cluster support disabled,  at /usr/local/share/perl/5.28.1/Redis.pm line 275.

From my perspective it would be great if Redis.pm was transparently used instead.

@iph0, I could implement such a feature in the future, if its OK from your side.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.