Repository navigation
Conversation
AsynchronousMetrics::update() called values.swap(new_values) and then passed new_values to processWarningForMutationStats / processWarningForMemoryOverload / processWarningForCPUOverload. After the swap, values holds the freshly computed metrics and new_values holds the previous cycle's data, so the warning helpers always read the previous cycle's snapshot. On the very first async metrics cycle new_values is empty/default after the swap, so no warnings are emitted even when the thresholds are clearly exceeded; afterwards the warning state lags reality by one cycle. Read from values instead so the warnings reflect the current cycle's metrics.
|
SAY-5 seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
1 task
pull Bot
pushed a commit
to CrazyForks/ClickHouse
that referenced
this pull request
Jul 1, 2026
In AsynchronousMetrics::update, after values.swap(new_values) the warning helpers were still passed new_values, which then holds the previous cycle's data. This lagged system.warnings by one cycle and emitted nothing on the first cycle. Pass the freshly computed `values` instead. Closes: ClickHouse#101759 Related: ClickHouse#102779 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
zeekay
pushed a commit
to hanzoai/datastore
that referenced
this pull request
Sep 11, 2026
In AsynchronousMetrics::update, after values.swap(new_values) the warning helpers were still passed new_values, which then holds the previous cycle's data. This lagged system.warnings by one cycle and emitted nothing on the first cycle. Pass the freshly computed `values` instead. Closes: ClickHouse#101759 Related: ClickHouse#102779 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
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.
Closes #101759.
AsynchronousMetrics::update()swaps the freshly computed values intovaluesand then feedsnew_valuesinto the warning helpers:After the swap,
valuesholds the fresh metrics andnew_valuesholds the previous cycle's snapshot, sosystem.warningslags reality by one async metrics cycle for mutation backlog, memory overload, and CPU overload — and on the very first cyclenew_valuesis empty/default after the swap, so no warnings are emitted at all even when thresholds are clearly exceeded.Read from
valuesinstead so the warning helpers see the same data the rest of the system sees. Verified against currentmaster.