Common/MemoryTracker: fix metrics not being updated after MemoryTracker reset#3344
Merged
alexey-milovidov merged 1 commit intoClickHouse:masterfrom Oct 11, 2018
Merged
Common/MemoryTracker: fix metrics not being updated after MemoryTracker reset#3344alexey-milovidov merged 1 commit intoClickHouse:masterfrom
alexey-milovidov merged 1 commit intoClickHouse:masterfrom
Conversation
…er reset The ClickHouse#3230 fixed a problem with memory accounting, but it introduces a regression in which the memory tracker isn't reset until there are zero queries in process list. This makes it difficult to see in tests as there's always just one query in-flight, but in production it produces a sawtooth memory usage pattern that resets when the allocated memory exceeds set memory limits and all queries are terminated.
Contributor
Author
|
This was broken in dd88c09 It's reproducible if this block is commented out: https://github.com/yandex/ClickHouse/blob/master/dbms/src/Interpreters/ProcessList.cpp#L270 |
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.
The #3230 fixed a problem with memory accounting, but it introduces a regression
in which the memory tracker isn't reset until there are zero queries in process list.
This makes it difficult to see in tests as there's always just one query in-flight,
but in production it produces a sawtooth memory usage pattern that resets when
the allocated memory exceeds set memory limits and all queries are terminated.
cc @dqminh @bocharov
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en