Skip to content

Do not reserve extra threads after max threads optimization for simple queries#11114

Merged
KochetovNicolai merged 4 commits intoClickHouse:masterfrom
azat:max_threads-simple-query-optimization-fix
May 25, 2020
Merged

Do not reserve extra threads after max threads optimization for simple queries#11114
KochetovNicolai merged 4 commits intoClickHouse:masterfrom
azat:max_threads-simple-query-optimization-fix

Conversation

@azat
Copy link
Copy Markdown
Member

@azat azat commented May 21, 2020

Changelog category (leave one):

  • Bug Fix

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Fix excessive reserving of threads for simple queries (optimization for reducing the number of threads, which was partly broken after changes in pipeline).

Do not reserve extra threads after max threads optimization for simple queries

Cc: @KochetovNicolai
Refs: #11104

@blinkov blinkov added the pr-bugfix Pull request with bugfix, not backported by default label May 21, 2020
@azat azat marked this pull request as draft May 21, 2020 23:16
@azat
Copy link
Copy Markdown
Member Author

azat commented May 21, 2020

Will undraft it once the test failures will be investigated

azat added 3 commits May 23, 2020 13:19
…e queries

Before this patch pipeline.setMaxThreads() was called with 0 (since
streams.size() == 0, while pipes.size() == 1), which leads that
pipeline.getMaxThreads() returns max_streams.

While this threads were not used, they were reserved, which should not
happens either.
@azat azat force-pushed the max_threads-simple-query-optimization-fix branch from 01ba6ea to 8c69245 Compare May 23, 2020 14:08
@azat azat marked this pull request as ready for review May 23, 2020 14:08
@azat
Copy link
Copy Markdown
Member Author

azat commented May 24, 2020

@KochetovNicolai can you take a look on PR?

Integration tests (release) — failed:1, passed:584, error:0

The test test_insert_distributed_load_balancing fails even without this changes, will take a look

@KochetovNicolai KochetovNicolai self-assigned this May 25, 2020
@KochetovNicolai KochetovNicolai merged commit c83014b into ClickHouse:master May 25, 2020
@azat azat deleted the max_threads-simple-query-optimization-fix branch May 25, 2020 18:16
KochetovNicolai added a commit that referenced this pull request Jun 8, 2020
…tion-fix

Do not reserve extra threads after max threads optimization for simple queries

(cherry picked from commit c83014b)
KochetovNicolai added a commit that referenced this pull request Jun 8, 2020
…tion-fix

Do not reserve extra threads after max threads optimization for simple queries

(cherry picked from commit c83014b)
@azat azat mentioned this pull request Jul 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-docs-needed pr-bugfix Pull request with bugfix, not backported by default

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants