Skip to content
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

More shutdown fixes #1797

Merged
merged 3 commits into from
Oct 10, 2022
Merged

More shutdown fixes #1797

merged 3 commits into from
Oct 10, 2022

Conversation

jstnlef
Copy link
Contributor

@jstnlef jstnlef commented Oct 10, 2022

Description

As it turns out, timing shutdowns is very hard to manage. I ended up putting the "stopping" variable back into the member list to ensure that it doesn't call Cluster().ShutdownAsync() again before it actually gets to the System.ShutdownAsync(). This will ensure that it is only called once if it's initiated by itself. The next thing I did was to change EndpointTerminatedEvent's OnError property to ShouldBlock because I found that even in a graceful termination, the code right now will attempt to reconnect to a node that it "just" terminated because the gossip actor likely has messages in its mailbox where the "Respond" PID includes the node that should be removed. By pausing reconnections, the errors I was seeing around reconnects seem to have disappeared.

Purpose

This pull request is a:

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

@rogeralsing rogeralsing merged commit 05ce028 into asynkron:dev Oct 10, 2022
@jstnlef jstnlef deleted the shutdown-fixes branch October 10, 2022 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants