Repository navigation
Conversation
Enmk
marked this pull request as draft
September 4, 2023 18:24
Contributor
|
This is an automated comment for commit 58e8857 with description of existing statuses. It's updated for the latest CI running ❌ Click here to open a full report in a separate page Successful checks
|
Enmk
commented
Sep 13, 2023
|
|
||
| bool checkOperationIsNotCanceled() const | ||
| { | ||
| if (merges_blocker->isCancelledForPartition(new_data_part->info.partition_id) |
Contributor
Author
There was a problem hiding this comment.
I assume here that the merge operation doesn't create parts in other partitions, so we might check only if the destination partition was canceled or not.
Enmk
commented
Sep 13, 2023
|
|
||
| bool MergeTask::GlobalRuntimeContext::isCancelled() const | ||
| { | ||
| return merges_blocker->isCancelledForPartition(future_part->part_info.partition_id) |
Contributor
Author
There was a problem hiding this comment.
I assume here that the merge operation doesn't create parts in other partitions, so we might check only if the destination partition was canceled or not.
Member
|
It failed with a segmentation fault because your code is not memory-safe. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
ALTER TABLE .. REPLACE PARTITIONdoesn't wait anymore for mutations/merges that happen in other partitionsDocumentation entry for user-facing changes
Add a user-readable short description of the changes that should be added to docs.clickhouse.com below.
On a big table with lots of parts/partitions and lots of merges/mutations scheduled on a table,
ALTER TABLE .. REPLACE PARTITIONwaits very long until all of those finish, even if the target partition is not affected by those merges and/or mutations. This leads to poor maintenance experience.With this improvement,
ALTER TABLE .. REPLACE PARTITIONonly waits for merges/mutations to the target partition, greatly reducing up the waiting period.Technically this stops the merges on all partitions and prevents new ones from starting, rather than stopping merges on the target partition only. But since
REPLACEis relatively simple, there is a high chance that merges and mutations are re-allowed relatively fast.Related: #45328