Repository navigation
fix: bound ClickHouse requests, close idle sockets - #249
Merged
Merged
Conversation
connect_timeout_ms and request_timeout_ms were declared but no client read them, so an insert to a stalled ClickHouse had no client-side bound. The pool's 2 s idle timeout never fired either: hyper-util sweeps idle connections only when the pool has a timer, so ClickHouse closed them and logged code 209 each time. - build_client hands the fork its own hyper client through Client::with_http_client: connect timeout, a pool timer with the 2 s idle timeout, and HTTPS verified against the system trust store with the aws-lc-rs provider and native roots, as before. - clickhouse.connect_timeout_ms (5 s), request_timeout_ms (30 s, queries and the insert upload) and the new insert_timeout_ms (60 s, the wait for the server's answer) reach the client. A zero is refused at startup. - A timed-out insert or schema fetch returns straight to the hold, its offset uncommitted, instead of retrying inside the flush cycle. - The TLS docs named tls_ca_file and tls_ca_exclusive keys no code reads; they now describe the system trust store and SSL_CERT_FILE.
CodeQL's sensitive-name heuristic reads a variable called trusted as a secret, and flagged the test's assert message that prints it.
|
Released in v1.18.50 -- https://github.com/hyperi-io/dfe-loader/releases/tag/v1.18.50 |
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.
The loader's ClickHouse client had no client-side bound on anything, and its idle pool never closed a connection.
connect_timeout_msandrequest_timeout_mswere declared but nothing read them, so an insert to a stalled ClickHouse waited on ClickHouse's own 300 s timeouts.What changes:
build_clienthands the fork its own hyper client throughClient::with_http_client: connect timeout, pool timer with the 2 s idle timeout, and HTTPS verified against the system trust store with the same aws-lc-rs provider and native roots as before. No fork change: the fork repo is archived, and Pre-GA bug sweep: the clickhouse patch #133 still stands.clickhouse.connect_timeout_ms(5 s),clickhouse.request_timeout_ms(30 s, queries and the insert upload) and the newclickhouse.insert_timeout_ms(60 s, the wait for the server's answer) are real config keys. A zero is refused at startup.max.poll.interval.ms.tls_ca_file/tls_ca_exclusivekeys no code reads. They now describe the system trust store andSSL_CERT_FILE.Tests:
SSL_CERT_FILE, refused with an unrelated CA, with the platform store alone, and on a host name the cert does not list. Plain HTTP still works.Done when the released image runs with the bounds on and ClickHouse stops logging 209 for idle loader connections.