Skip to content

connection_pool: recover instances after a cluster restart#343

Open
Mockird31 wants to merge 1 commit into
masterfrom
mockird31/gh-328-recover-pool-restart
Open

connection_pool: recover instances after a cluster restart#343
Mockird31 wants to merge 1 commit into
masterfrom
mockird31/gh-328-recover-pool-restart

Conversation

@Mockird31

@Mockird31 Mockird31 commented Jul 20, 2026

Copy link
Copy Markdown

Treat any instance error as an unhealthy state instead of an unhandled exception. An instance which has not finished its bootstrap yet replies with an error to box.info, and the Response constructor raises it as a plain DatabaseError. _get_new_state() caught only a NetworkError, so the error escaped the background refresh loop and killed its thread.

Close the socket if a handshake fails: is_closed() only checks the socket, so such a connection was reported as open and was never authenticated again.

Closes #328

@Mockird31
Mockird31 marked this pull request as draft July 20, 2026 13:44
@Mockird31
Mockird31 force-pushed the mockird31/gh-328-recover-pool-restart branch from a1ce92b to 5cb4cf4 Compare July 20, 2026 16:22
@Mockird31
Mockird31 marked this pull request as ready for review July 20, 2026 17:03
@oleg-jukovec
oleg-jukovec removed the request for review from DifferentialOrange July 21, 2026 09:46
@oleg-jukovec

Copy link
Copy Markdown
Contributor

Should be Closes #328

@Mockird31
Mockird31 force-pushed the mockird31/gh-328-recover-pool-restart branch from 5cb4cf4 to 3a4f1e4 Compare July 21, 2026 19:53
Treat any instance error as an unhealthy state instead of an unhandled
exception. An instance which has not finished its bootstrap yet replies
with an error to `box.info`, and the `Response` constructor raises it
as a plain DatabaseError. `_get_new_state()` caught only a
NetworkError, so the error escaped the background refresh loop and
killed its thread.

Close the socket if a handshake fails: `is_closed()` only checks the
socket, so such a connection was reported as open and was never
authenticated again.

Closes #328
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ConnectionPool stuck on error after cluster restart

2 participants