-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: graceful shutdown #1994
fix: graceful shutdown #1994
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice, just see one suggestion about how we track/reference pending connext requests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking forward to getting this in... 👍
Fix is in, could you give this another look? @sangaman |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great now. This is a nice approach and good sleuth work to identify these issues, I'm expecting this to make a real difference.
Another case (don't know if we want to stay it like this) is that somebody calling streamorders or new stream grpc call subscribe alerts (#1984) then unless stream is closed xud is not being closed. Ignore if this's intentional. |
I think we should to close streams as part of the shutdown procedure. If that's not the case, want to take care of it as a separate PR? @rsercano |
Sure as long as @LePremierHomme doesn't want to address it, I can check too. |
Definitely not as part of this PR, so go ahead 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works very nicely for me. Thanks for this!
After digging into this, I realized this has already been addressed for |
This fixes a regression introduced in #1994 that prevents enabling the stall timer for peers that checks whether peers are not responding to our packets in a reasonable timeframe and disconnecting those that are not. Without these checks, peers that have gone offline may remain in the list of connected peers, resulting in unexpected behavior and also preventing those peers from establishing new connections with us once they come back online. Closes #2010.
This fixes a regression introduced in #1994 that prevents enabling the stall timer for peers that checks whether peers are not responding to our packets in a reasonable timeframe and disconnecting those that are not. Without these checks, peers that have gone offline may remain in the list of connected peers, resulting in unexpected behavior and also preventing those peers from establishing new connections with us once they come back online. Closes #2010.
An attempt to solve #1668.
Various fixes were made to prevent delays in shutdown:
ConnextClient
's pending HTTP requests, and abort them on shutdown (besides the critical ones). Ajest
test was added, but it's using an HTTP client mock (which works according tonodejs
documentation). This is not ideal, but I thought that using a real HTTP client/server for this test would be an overkill.This behaviour still need to be manually tested.
Pending swaps are still expected to (intentionally) cause delay in shutdown.
There might be other issues which cause a delay which I haven't encountered.
So any help in testing would be appriciated. Please paste your logs here (even if it works).
To launch via
xud-docker
: