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

Made parallel_reading_from_replicas work with localhost replica #36281

Merged
merged 3 commits into from
Apr 22, 2022

Conversation

nikitamikhaylov
Copy link
Member

Changelog category (leave one):

  • Improvement

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):

We create a local interpreter if we want to execute query on localhost replica. But for when executing query on multiple replicas we rely on the fact that a connection exists so replicas can talk to coordinator. It is now improved and localhost replica can talk to coordinator directly in the same process

Information about CI checks: https://clickhouse.tech/docs/en/development/continuous-integration/

@robot-clickhouse robot-clickhouse added the pr-improvement Pull request with some product improvements label Apr 14, 2022
@nikitamikhaylov
Copy link
Member Author

@Mergifyio update

@mergify
Copy link
Contributor

mergify bot commented Apr 19, 2022

update

✅ Branch has been successfully updated

@KochetovNicolai KochetovNicolai self-assigned this Apr 20, 2022
checkStackSize();

auto query_plan = std::make_unique<QueryPlan>();
auto mutable_context = const_pointer_cast<Context>(context);
Copy link
Member

Choose a reason for hiding this comment

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

That does not seem to be safe to me.
Note, here inside InterpreterSelectQuery we copy context:

, context(Context::createCopy(context_))
(and that's why shard_num and shard_count are specified over SelectQueryOptions).

Maybe it would be better to:

  • create InterpreterSelectQuery first
  • add a method inside InterpreterSelectQuery which setMergeTreeReadTaskCallback
  • buildQueryPlan

Copy link
Member

@KochetovNicolai KochetovNicolai left a comment

Choose a reason for hiding this comment

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

everything else is ok

@nikitamikhaylov
Copy link
Member Author

Intergration tests: Get "https://registry-1.docker.io/v2/": context deadline exceeded

@nikitamikhaylov nikitamikhaylov merged commit 224f4dc into master Apr 22, 2022
@nikitamikhaylov nikitamikhaylov deleted the parallel-reading-from-localhost-replica branch April 22, 2022 13:52
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.

3 participants