-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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
Distributed and remote timeouts #4558
Distributed and remote timeouts #4558
Conversation
d322bed
to
465aa34
Compare
4b6fee9
to
b52f153
Compare
b52f153
to
0f80e1c
Compare
b26578d
to
4047ad8
Compare
? |
I've implemented here all the suggestions from developers telegram channel but it doesn't seem to solve the problem. Failing tests are not related to new code. So I can rebease tomorrow morning and see if it is better at least in terms of tests. |
One probable issue introduced is client program timeouts - when long operation is running sometimes one can get Timeout exception when it doesn't look like the right thing to happen. |
4047ad8
to
b97cee0
Compare
a1be956
to
3154f07
Compare
maybe it is better to provide some `set_timeouts` method?
…ger than timeouts state
…gs.max_execution_time)` from `Cluster`
0596276
to
63804d9
Compare
63804d9
to
6dbf287
Compare
@@ -57,7 +57,6 @@ class Connection : private boost::noncopyable | |||
Connection(const String & host_, UInt16 port_, | |||
const String & default_database_, | |||
const String & user_, const String & password_, | |||
const ConnectionTimeouts & timeouts_, |
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.
It's just a question. Why you don't want to save old behaviour? There are a lot of places in code, where fixed timeout is OK. Constructor may take default_timeouts
, and in each function we can pass non default, otherwise they would use default. Diff would be much smaller, and Connection
interface would be more convenient.
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.
This way it was easier to debug as missing argument or variable is a compilation error while wrong default value requires complicated integration tests. On the other hand I don't think the diff would be much smaller because of additional logic to chose between default value and provided via method argument.
@@ -55,11 +55,9 @@ class PoolWithFailoverBase : private boost::noncopyable | |||
|
|||
PoolWithFailoverBase( | |||
NestedPools nested_pools_, | |||
size_t max_tries_, |
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.
Same with timeout
.
Qrator Labs s.r.o. contributes this under the terms of the Apache-2.0 license
related to issue #4211
Category (leave one):
Previously timeouts for clusters and clickhouse-dictionaries were basically immutable after corresponding object creation. This PR tackles this.