-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
Disable logic max_threads=max_distributed_connections when async_socket_for_remote=1 #53504
Disable logic max_threads=max_distributed_connections when async_socket_for_remote=1 #53504
Conversation
This is an automated comment for commit aa2bf5a with description of existing statuses. It's updated for the latest CI running ❌ Click here to open a full report in a separate page Successful checks
|
tests/queries/0_stateless/02845_threads_count_in_distributed_queries.sql
Outdated
Show resolved
Hide resolved
tests/queries/0_stateless/02845_threads_count_in_distributed_queries.sql
Outdated
Show resolved
Hide resolved
|
Does it also require hedged_requests to avoid slowdown? |
bool is_remote = false; | ||
if (storage && storage->isRemote()) | ||
bool is_sync_remote = false; | ||
if (storage && storage->isRemote() && !settings.async_socket_for_remote) |
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.
Maybe also worth checking async_query_sending_for_remote
setting
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.
I thought about this as well (and also about use_hedged_requests
), but it seems that it should not be required, since only in case of async_socket_for_remote
the result will be received in parallel (regardless of max_distributed_connections
)
tests/queries/0_stateless/02845_threads_count_in_distributed_queries.sql.j2
Outdated
Show resolved
Hide resolved
tests/queries/0_stateless/02845_threads_count_in_distributed_queries.sql.j2
Outdated
Show resolved
Hide resolved
tests/queries/0_stateless/02845_threads_count_in_distributed_queries.sql.j2
Outdated
Show resolved
Hide resolved
tests/queries/0_stateless/02845_threads_count_in_distributed_queries.sql.j2
Outdated
Show resolved
Hide resolved
tests/queries/0_stateless/02845_threads_count_in_distributed_queries.sql.j2
Outdated
Show resolved
Hide resolved
@filimonov, would you mind fixing the tests and addressing the review comments? |
Was on short vacations. Getting back to that. |
8c8412f
to
9807491
Compare
@@ -128,4 +128,5 @@ | |||
02790_optimize_skip_unused_shards_join | |||
01940_custom_tld_sharding_key | |||
02815_range_dict_no_direct_join | |||
02845_threads_count_in_distributed_queries |
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.
select count() from remote('127.0.0.1:9000', view( SELECT * FROM system.one UNION ALL SELECT * FROM system.one)) settings allow_experimental_analyzer=0;
┌─count()─┐
│ 2 │
└─────────┘
select count() from remote('127.0.0.1:9000', view( SELECT * FROM system.one UNION ALL SELECT * FROM system.one)) settings allow_experimental_analyzer=1;
┌─count()─┐
│ 1 │
└─────────┘
A test has failed. |
Yep. I've wanted to demonstrate to @azat the issue discussed in that comment: #53504 (comment)
37 is much more than max_threads (5) + 2. But that problem is unrelated to that story. I'll just relax that limit for now, and put the comment. |
Thanks.
Yes, but still And just to double check, here is some output for the test on my machine - https://gist.github.com/azat/024a9253190db9f50e78d219c266c731 That query uses 7 threads, like it should, but as you can see in And also sometimes it fails in case of settings randomization, because you need to specify some options explicitly (at least And anyway simply using |
tests/queries/0_stateless/02845_threads_count_in_distributed_queries.sql.j2
Outdated
Show resolved
Hide resolved
…reads_usage" This reverts commit 4da2d7c.
4774f88
to
d8cddea
Compare
There is something else - https://s3.amazonaws.com/clickhouse-test-reports/53504/bbba89977803200b83d7f35637304be886311b4d/stateless_tests__debug__s3_storage__[5_6].html
|
It's S3 storage test, so may be remote_filesystem_read_method=read similar to local_filesystem_read_method='pread'? (default is I'll try it. |
all failures seem unrelated now |
Need to check timeouts for tests UPD: run these tests locally many times, looks ok |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Distributed queries executed in
async_socket_for_remote
mode (default) now respectmax_threads
limit. Previously, some queries could create excessive threads (up tomax_distributed_connections
), causing server performance issues.Documentation entry for user-facing changes
See #53287