Skip to content

Do not fence connections without valid greeting. (replaces #190)#217

Open
aversecat wants to merge 1 commit intomainfrom
auke/portscan
Open

Do not fence connections without valid greeting. (replaces #190)#217
aversecat wants to merge 1 commit intomainfrom
auke/portscan

Conversation

@aversecat
Copy link
Contributor

@aversecat aversecat commented May 5, 2025

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:

    client 127.0.0.1:12345 reconnect timed out, fencing

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.

@aversecat aversecat added the Bugfix Fixes a known bug label May 5, 2025
@aversecat
Copy link
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>
@aversecat
Copy link
Contributor Author

retest

@aversecat aversecat added the WIP label Oct 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bugfix Fixes a known bug WIP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant