Skip to content

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

Merged
alexey-milovidov merged 1 commit intoClickHouse:masterfrom
vavrusa:master
Oct 11, 2018
Merged

Common/MemoryTracker: fix metrics not being updated after MemoryTracker reset#3344
alexey-milovidov merged 1 commit intoClickHouse:masterfrom
vavrusa:master

Conversation

@vavrusa
Copy link
Copy Markdown
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
Copy Markdown
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