Fix flaky tests caused by OPTIMIZE FINAL failing memory budget check#49764
Merged
alexey-milovidov merged 2 commits intomasterfrom Jul 5, 2023
Merged
Fix flaky tests caused by OPTIMIZE FINAL failing memory budget check#49764alexey-milovidov merged 2 commits intomasterfrom
alexey-milovidov merged 2 commits intomasterfrom
Conversation
Contributor
|
This is an automated comment for commit a4abb81 with description of existing statuses. It's updated for the latest CI running
|
alesapin
reviewed
May 19, 2023
| if (!is_background_memory_usage_ok(out_disable_reason)) | ||
| { | ||
| constexpr auto poll_interval = std::chrono::seconds(1); | ||
| Int64 attempts = timeout / poll_interval; |
Member
There was a problem hiding this comment.
This time is quite big (120 seconds). So we can wait here for a long time + additionally we can wait for currently_merging_mutating_parts another 120 seconds (next lines after loop). Maybe update timeout value after wait here?
Member
|
@al13n321 Maybe it worth to add |
This was referenced Jun 3, 2023
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):
02461_prewhere_row_level_policy_lightweight_delete and 02458_relax_too_many_parts failed in the same way: their
OPTIMIZE ... FINALquery didn't do the merge becauseCurrent background tasks memory usage (31.77 GiB) is more than the limit (31.01 GiB).This PR does two things:
A lot of the 31+ GB background memory usage seems to come from tests
02581_share_big_sets_*. This PR marks 2/4 of them as no-parallel (the ones that are also marked long; I guessed that the other 2 use much less memory, but don't actually know what I'm doing).OPTIMIZE FINALalready has a retry loop for something similar: to wait for other merges to complete. This PR moves the memory budget check into a similar retry loop. It re-checks the limit every second for up to 2 minutes (lock_acquire_timeout_for_background_operations).