Skip to content

Distinguish KILL MUTATION for different tables.#25025

Merged
alexey-milovidov merged 4 commits intoClickHouse:masterfrom
azat:parallel-kill-mutation
Jun 8, 2021
Merged

Distinguish KILL MUTATION for different tables.#25025
alexey-milovidov merged 4 commits intoClickHouse:masterfrom
azat:parallel-kill-mutation

Conversation

@azat
Copy link
Copy Markdown
Member

@azat azat commented Jun 6, 2021

Changelog category (leave one):

  • Bug Fix

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Distinguish KILL MUTATION for different tables (fixes unexpected Cancelled mutating parts error)

Detailed description / Documentation draft:
Before this patch KILL MUTATION marks mutation as canceled just by name
(and part numbers) so if you have multiple tables with the same part
name, then killing mutation for one table, will mark it as killed for
another too.

Fix this by comparing StorageID too (it is better to use StorageID over
database/table to avoid ambiguity by using UUIDs for comparing).

Here is a failure of the 01414_freeze_does_not_prevent_alters on CI 1.

Refs: #24809

@robot-clickhouse robot-clickhouse added the pr-bugfix Pull request with bugfix, not backported by default label Jun 6, 2021
@alexey-milovidov alexey-milovidov self-assigned this Jun 6, 2021
azat added 4 commits June 8, 2021 10:51
This will avoid bugs, like comparing StorageID w/o operator== via cast
to bool.
Before this patch KILL MUTATION marks mutation as canceled just by name
(and part numbers) so if you have multiple tables with the same part
name, then killing mutation for one table, will mark it as killed for
another too.

Fix this by comparing StorageID too (it is better to use StorageID over
database/table to avoid ambiguity by using UUIDs for comparing).

Here is a failure of the 01414_freeze_does_not_prevent_alters on CI [1].

  [1]: https://clickhouse-test-reports.s3.yandex.net/24069/9fb69dcf98c71a939d200cad3c8491bf43a44622/functional_stateless_tests_(ubsan).html#fail1
@azat azat force-pushed the parallel-kill-mutation branch from dd9954d to fc46005 Compare June 8, 2021 07:52
@alexey-milovidov alexey-milovidov merged commit e25d984 into ClickHouse:master Jun 8, 2021
@azat azat deleted the parallel-kill-mutation branch June 8, 2021 23:44
alexey-milovidov added a commit that referenced this pull request Jun 12, 2021
Backport #25025 to 21.6: Distinguish KILL MUTATION for different tables.
alexey-milovidov added a commit that referenced this pull request Jun 12, 2021
Backport #25025 to 21.5: Distinguish KILL MUTATION for different tables.
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.

4 participants