Repository navigation
internal/db: Close accept channel before closing dqlite on failed bootstrap or join - #850
Open
claudiubelu wants to merge 3 commits into
Open
claudiubelu wants to merge 3 commits into
claudiubelu wants to merge 3 commits into
Conversation
…tstrap or join When Bootstrap or Join fails, the reverter closes the dqlite app but keeps the accept channel open. The go-dqlite reader ranging over it keeps receiving connections from the remaining cluster members and panics when it cannot dial the closed app's local socket, crashing the daemon before the join failure cleanup can run. Rotate the accept channel before closing the dqlite app, like Restart already does. Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
…ffline
On a failed join, the cluster member handling the cleanup resets the
joiner through PUT /cluster/{name}.
That endpoint required an open database, which a joiner whose dqlite
join failed never has, so the reset was refused and the joiner could
not be initialized again until its daemon was restarted.
Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
claudiubelu
force-pushed
the
v4-join-accept-channel
branch
from
October 19, 2026 14:19
987bcc5 to
5e5274a
Compare
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.
When
BootstraporJoinfails, the reverter closes the dqlite app but keeps the accept channel open. The go-dqlite reader ranging over it keeps receiving connections from the remaining cluster members and panics when it cannot dial the closed app's local socket, crashing the daemon before the join failure cleanup can run.Rotate the accept channel before closing the dqlite app, like Restart already does.
On a failed join, the cluster member handling the cleanup resets the joiner through
PUT /cluster/{name}. That endpoint required an open database, which a joiner whose dqlite join failed never has, so the reset was refused and the joiner could not be initialized again until its daemon was restarted.Adds a failed cluster join test scenario.