Wait for currently active merges when executing OPTIMIZE FINAL on RMT#62067
Merged
nickitat merged 4 commits intoClickHouse:masterfrom Apr 22, 2024
Merged
Conversation
Contributor
|
This is an automated comment for commit 0bd3d5d 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
|
95196ca to
becedbd
Compare
tavplubix
reviewed
Apr 3, 2024
| /// Here we trying to have a similar behaviour to ordinary MergeTree: if some merges are already in progress - let's wait for them to finish. | ||
| /// This way `optimize final` won't just silently be a noop (if also `optimize_throw_if_noop=false`), but will wait for the active merges and repeat an attempt to schedule final merge. | ||
| /// This guarantees are enough for tests, because there we have full control over insertions. | ||
| const auto wait_timeout = query_context->getSettingsRef().receive_timeout.totalMilliseconds() / max_retries; |
Member
There was a problem hiding this comment.
OPTIMIZE does not send progress, so client will disconnect after the first try, and it will not receive the exception
Also, max_retries * receive_timeout = 50 minutes, it's too much
Member
Author
There was a problem hiding this comment.
because of that I set each individual timeout to receive_timeout / max_retries
maybe I missed your point
Member
There was a problem hiding this comment.
Ah, sorry, I missed / max_retries
tavplubix
approved these changes
Apr 9, 2024
1217fce to
dd45151
Compare
Member
|
@nickitat looks like it breaks |
Member
Author
19 tasks
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):
OPTIMIZE FINALforReplicatedMergeTreenow will wait for currently active merges to finish and then reattempt to schedule a final merge. This will put it more in line with ordinaryMergeTreebehaviour.cc @tavplubix