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

Better handling for connection errors in the std interface #879

Merged
merged 1 commit into from
Jan 27, 2023

Conversation

n-oden
Copy link
Contributor

@n-oden n-oden commented Jan 25, 2023

  • check for EOF/EPIPE errors in the major functions of clickhouse_std.go and explicitly return driver.ErrBadConn when we catch them

  • add debug logging of most error conditions to the std interface, following the existing pattern for error handling

Signed-off-by: Nathan J. Mehl [email protected]

@n-oden
Copy link
Contributor Author

n-oden commented Jan 25, 2023

@jkaflik I think this is the other piece of the puzzle, at least for the std interface: with this patch in place on our side and debugging enabled, resetting a server node results in one EOF error logged per active connection, no "context cancelled" errors, and an immediate recovery.

clickhouse_std.go Outdated Show resolved Hide resolved
@n-oden n-oden force-pushed the add-more-logging-std branch 2 times, most recently from 3a1df47 to e7a9e51 Compare January 27, 2023 15:37
- check for EOF/EPIPE errors in the major functions of
  clickhouse_std.go and explicitly return driver.ErrBadConn
  when we catch them

- add debug logging of most error conditions to the std interface,
  following the existing pattern for error handling

Signed-off-by: Nathan J. Mehl <[email protected]>
@jkaflik jkaflik merged commit 1be6c11 into ClickHouse:main Jan 27, 2023
@n-oden n-oden deleted the add-more-logging-std branch January 28, 2023 18:44
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