Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Common/MemoryTracker: fix metrics not being updated after MemoryTracker reset #3344

Merged
merged 1 commit into from
Oct 11, 2018

Conversation

vavrusa
Copy link
Contributor

@vavrusa vavrusa commented Oct 11, 2018

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

…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.
@vavrusa
Copy link
Contributor Author

vavrusa commented Oct 11, 2018

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

@alexey-milovidov alexey-milovidov merged commit 3e60a91 into ClickHouse:master Oct 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants