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

Distributed and remote timeouts #4558

Merged
merged 19 commits into from
Jun 17, 2019

Conversation

code-of-kpp
Copy link
Contributor

Qrator Labs s.r.o. contributes this under the terms of the Apache-2.0 license

related to issue #4211

Category (leave one):

  • Improvement

Previously timeouts for clusters and clickhouse-dictionaries were basically immutable after corresponding object creation. This PR tackles this.

@code-of-kpp code-of-kpp force-pushed the distributred-timeout branch from d322bed to 465aa34 Compare March 2, 2019 18:51
@code-of-kpp code-of-kpp marked this pull request as ready for review March 2, 2019 21:50
@code-of-kpp code-of-kpp force-pushed the distributred-timeout branch from 4b6fee9 to b52f153 Compare March 4, 2019 02:41
@code-of-kpp code-of-kpp force-pushed the distributred-timeout branch from b52f153 to 0f80e1c Compare March 7, 2019 23:20
@code-of-kpp code-of-kpp changed the title [WIP] Distributred and remote timeouts [WIP] Distributed and remote timeouts Mar 8, 2019
@code-of-kpp code-of-kpp force-pushed the distributred-timeout branch from b26578d to 4047ad8 Compare March 8, 2019 11:21
@alexey-milovidov
Copy link
Member

?

@code-of-kpp
Copy link
Contributor Author

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.

@code-of-kpp
Copy link
Contributor Author

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.

@code-of-kpp code-of-kpp force-pushed the distributred-timeout branch from 4047ad8 to b97cee0 Compare May 10, 2019 15:16
@code-of-kpp code-of-kpp force-pushed the distributred-timeout branch 3 times, most recently from a1be956 to 3154f07 Compare June 1, 2019 15:46
@code-of-kpp code-of-kpp force-pushed the distributred-timeout branch 2 times, most recently from 0596276 to 63804d9 Compare June 2, 2019 17:54
@code-of-kpp code-of-kpp force-pushed the distributred-timeout branch from 63804d9 to 6dbf287 Compare June 2, 2019 17:54
@code-of-kpp code-of-kpp changed the title [WIP] Distributed and remote timeouts Distributed and remote timeouts Jun 2, 2019
@@ -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_,
Copy link
Member

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.

Copy link
Contributor Author

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_,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same with timeout.

@alesapin alesapin merged commit e45d727 into ClickHouse:master Jun 17, 2019
@4ertus2 4ertus2 added the pr-improvement Pull request with some product improvements label Jun 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-improvement Pull request with some product improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants