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

Catch exceptions in BackgroundSchedulePool #44923

Merged
merged 2 commits into from
Jan 29, 2023

Conversation

azat
Copy link
Collaborator

@azat azat commented Jan 4, 2023

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

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

Catch exceptions in BackgroundSchedulePool

I saw the case when one of users of BackgroundSchedulePool (DirectoryMonitor for async INSERT into Distributed table) throws (in a very unlikely scenario, which which #44922 may help), and this case the task is leaved in an undefined state, and instead of fix this I put assert to catch such code instead.

This is less significant then #27428, and should not introduce issues like #27812

I saw the case when one of users of BackgroundSchedulePool
(DirectoryMonitor for async INSERT into Distributed table) throws (in
a very unlikely scenaior, which wich ClickHouse#44922 may help), and this case the
task is leaved in an undefined state, and instead of fix this I put
assert to catch such code instead.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
@robot-clickhouse robot-clickhouse added the pr-not-for-changelog This PR should not be mentioned in the changelog label Jan 4, 2023
@alexey-milovidov alexey-milovidov self-assigned this Jan 29, 2023
@alexey-milovidov alexey-milovidov merged commit 3534c39 into ClickHouse:master Jan 29, 2023
@azat azat deleted the bg-pool-catch branch January 29, 2023 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-not-for-changelog This PR should not be mentioned in the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants