Giter Club home page Giter Club logo

Comments (2)

bjosv avatar bjosv commented on September 25, 2024

After first having run a lots of test with node restarts I could only find a segfault issue that is to be fixed with #107, but the assert() described above was never hit.
In my tests redisClusterAsyncCommand is either called by a timer event or via an event_base_once.

Normally a command callback is called by the underlaying hiredis and when the connection is disconnected hiredis will reset the async context pointer in a node object, i.e the assert should not be reached/triggered.

But, I think I managed to reproduce the issue when calling redisClusterAsyncCommand from a command callback, i.e. when a given callback is called after a command has been sent. This callback gives a NULL reply when a connection is broken, but if it also attempts to send a new command before the callback has finished the node object still has an async context with errors.
Is this similar to your setup? I.e do you use libevent and send commands from a command callback?

from hiredis-cluster.

SS-TruMinds avatar SS-TruMinds commented on September 25, 2024

Thank you.

We are invoking redisClusterAsyncCommand() calls both from the application, and also from hiredis callbacks.
But we have also added a guard -- we return immediately without processing any Redis callbacks that get called after the disconnect callback indicating that the connection has broken. So the assert must be getting triggered from redisClusterAsyncCommand() called by the application.

from hiredis-cluster.

Related Issues (20)

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.