-
Notifications
You must be signed in to change notification settings - Fork 578
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
refactor(connector): replace hyper client implementation with reqwest #16146
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @BugenZhao and the rest of your teammates on Graphite |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -190,18 +190,9 @@ impl ClickHouseEngine { | |||
} | |||
} | |||
|
|||
const POOL_IDLE_TIMEOUT: Duration = Duration::from_secs(5); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is is ok to remove this POOL_IDLE_TIMEOUT
setting? I guess the original purpose not to use ClickHouseClient::default()
is to set this config. cc @xxhZs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The corresponding pr is this one, https://github.com/risingwavelabs/risingwave/pull/12041/files
If we do not set, the default value of POOL_IDLE_TIMEOUT
is 2s in clickhouse.rs, the reason for not using the default here is to support https urls
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If so, we may not modify the code here? @BugenZhao
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the reason for not using the default here is to support https urls
I didn't find the clue for this. The reason why #12041 works is explained in ClickHouse/clickhouse-rs#58 (comment). There seems nothing to do with the POOL_IDLE_TIMEOUT
.
BTW, the upstream has submitted a fix (risingwavelabs/clickhouse.rs@3fc12f6) and there's no more need for this workaround. Should we sync the changes instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May need to run a test to connect to clickhouse with https. If it passes, we can then sync the change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cherry-picked the fix into our fork of clickhouse.rs
.
Signed-off-by: Bugen Zhao <[email protected]>
Signed-off-by: Bugen Zhao <[email protected]>
Signed-off-by: Bugen Zhao <[email protected]>
Signed-off-by: Bugen Zhao <[email protected]>
f69fd95
to
86c3adf
Compare
7a67c29
to
48e38c0
Compare
Signed-off-by: Bugen Zhao <[email protected]>
Signed-off-by: Bugen Zhao <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
.await | ||
.map_err(|err| SinkError::DorisStarrocksConnect(err.into()))?; | ||
// TODO: shall we let `reqwest` handle the redirect? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, I wonder if the logic of the following special verdict is an obstacle cc @xuefengze
#15429 introduced another occurrence. 🤡🤡 |
Signed-off-by: Bugen Zhao <[email protected]>
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
hyper::Client
is deprecated inhyper v1
because it's considered to be higher-level.We'd better switch to
reqwest
for high-level HTTP client.Checklist
./risedev check
(or alias,./risedev c
)Documentation
Release note
If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.