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

Fixed bad server shutdown #6231

Merged
merged 6 commits into from
Jul 31, 2019
Merged

Fixed bad server shutdown #6231

merged 6 commits into from
Jul 31, 2019

Conversation

alexey-milovidov
Copy link
Member

For changelog. Remove if this is non-significant change.

Category (leave one):

  • Bug Fix

Short description (up to few sentences):
Fixed the case when server may close listening sockets but not shutdown and continue serving remaining queries. You may end up with two running clickhouse-server processes. Sometimes, the server may return an error bad_function_call for remaining queries.

@alexey-milovidov alexey-milovidov added the pr-bugfix Pull request with bugfix, not backported by default label Jul 30, 2019
@alexey-milovidov
Copy link
Member Author

alexey-milovidov commented Jul 30, 2019

The error exists from 19.3.3. Before this version there was also the case for unclean server shutdown but there was no issue that the server can't shutdown due to remaining queries.

@alexey-milovidov
Copy link
Member Author

No tests for this PR.

@alexey-milovidov
Copy link
Member Author

Queries like SELECT count() FROM system.numbers are correctly killed on shutdown.

I've also tested with the query SELECT (SELECT count() FROM system.numbers) AS x - I've used the fact that evaluation of scalar subqueries does not send progress packets.

@alexey-milovidov
Copy link
Member Author

Only the b627501 commit will be backported.

@alexey-milovidov alexey-milovidov added v19.10 minor Priority: minor labels Jul 30, 2019
@alexey-milovidov alexey-milovidov merged commit 10ab19b into master Jul 31, 2019
@alesapin alesapin added v19.12 and removed v19.10 labels Aug 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor Priority: minor pr-bugfix Pull request with bugfix, not backported by default
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants