Do not fence connections without valid greeting. (replaces #190)#217
Open
Do not fence connections without valid greeting. (replaces #190)#217
Conversation
Contributor
Author
|
Replaces #190. The underlying problem is that there seems to be nothing in place to drop outdated connections from the server, aside disconnecting all clients, restarting it, and having everyone connect to the new server. If this would be added, then the server wouldn't have to do this interruptive process of restarting the listening socket. So, this is just a start to address the issue. |
There is no reason to fence any connection that hasn't sent a valid greeting, since they haven't progressed far enough for it to make sense. We remove the connection from the list of accepted clients, which then removes the need for fencing, and the server won't need to restart. Adds a test script that makes sure that we didn't actually restart the server while this was happening. Signed-off-by: Auke Kok <auke.kok@versity.com>
Contributor
Author
|
retest |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There is no reason to fence any connection that hasn't sent a valid greeting, since they haven't progressed far enough for it to make sense.
This prevents the server from emitting:
But, it doesn't actually affect the behavior much. No fencing is taking place at this time. The server will still close all listening sockets and hand over to the next server, and all clients will disconnect and reconnect to the new leader.