Skip to content

Control alter sequential execution more correctly#18518

Merged
alesapin merged 4 commits intomasterfrom
fix_bug_with_alter_hung
Dec 29, 2020
Merged

Control alter sequential execution more correctly#18518
alesapin merged 4 commits intomasterfrom
fix_bug_with_alter_hung

Conversation

@alesapin
Copy link
Copy Markdown
Member

I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en

Changelog category (leave one):

  • Bug Fix

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Fix bug which may lead to ALTER queries hung after corresponding mutation kill. Found by thread fuzzer.

@robot-clickhouse robot-clickhouse added the pr-bugfix Pull request with bugfix, not backported by default label Dec 25, 2020
if (!queue_state.count(alter_version))
queue_state.emplace(alter_version, AlterState{.metadata_finished=false, .data_finished=!have_mutation});
else /// Data alter can be added before.
queue_state.emplace(alter_version, AlterState{.metadata_finished=false, .data_finished=true});
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why may ALTER queries hung? Do they wait on data_finished being true?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, but corresponding data alter can be already killed.

@alesapin
Copy link
Copy Markdown
Member Author

Probably this failure with fuzzer is OK. Going to fix test.

@alesapin
Copy link
Copy Markdown
Member Author

Yes, now it's fixed

@alesapin alesapin merged commit 00836a7 into master Dec 29, 2020
@alesapin alesapin deleted the fix_bug_with_alter_hung branch December 29, 2020 09:08
alesapin added a commit that referenced this pull request Jan 11, 2021
Backport #18518 to 20.10: Control alter sequential execution more correctly
alesapin added a commit that referenced this pull request Jan 11, 2021
Backport #18518 to 20.11: Control alter sequential execution more correctly
alesapin added a commit that referenced this pull request Jan 11, 2021
Backport #18518 to 20.12: Control alter sequential execution more correctly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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