Coder Social home page Coder Social logo

Comments (4)

madolson avatar madolson commented on August 17, 2024

I suppose another option would be to allow specifying an error handler in the API, which get's called if the API fails. That would allow us to better support the error case.

@PingXie Just want to get your opinion on this. I think we should do three things:

  1. Change connSetHandler so it returns a void.
  2. Attempt to handle the case where an fd is out of bounds by doing an in-place realloc of the array and log a message.
  3. Call the error handler when we encounter an error.

from valkey.

PingXie avatar PingXie commented on August 17, 2024

Both 1) and 2) make sense to me. Can you elaborator on 3)? I am not sure which error handler this is. If we can realloc, there isn't much for the caller to handle anyway; but if we can't, I think we have a bigger issue.

from valkey.

madolson avatar madolson commented on August 17, 2024

but if we can't, I think we have a bigger issue.

I guess I just don't know if we actually have bigger issues. Today we might just be silently ignoring issues on error paths which get resolved later. I can imagine there are cases where a client was accepted, has already been closed by the file system by some later time we install the handler, and we gracefully ignore the epoll_ctl command since the client will get eventually closed anyways.

So, my thought for the error handler, is just to make sure we aren't "leaking" the client resource (for the normal client case) and the clusterbus (in the cluster case). If after some time in product we don't observe any issue, we could remove it.

from valkey.

PingXie avatar PingXie commented on August 17, 2024

If we do 1) and 2), we will be able to handle all errors internally to aeApiAddEvent so we probably don't need an error handler callback. Should we consider a fix in Valkey 8.0?

from valkey.

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.