-
Notifications
You must be signed in to change notification settings - Fork 545
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
Don't free buffers after reading query stream #9721
Conversation
Follow up on #9401 While the write path has been carefully crafted to make sure that we don't keep references to the strings backed by arrays with data from grpc stream (because it would cause a memory leak), this doesn't seem to be the case in the query path, where some tests started failing after we started to reuse those backing arrays through the usage of memory buffers implemented in the new gRPC library. This change reverts the buffer freeing, means that it won't be recycled (and will be garbage collected) to ensure data correctness, while we investigate where the data references are kept. Signed-off-by: Oleg Zaytsev <[email protected]>
There was no changelog entry in #9401 so nothing to update here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems legit. I guess we should take a look at the profiles once it gets into use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥 Works for me
where some tests started failing after we started to reuse those backing arrays through the usage of memory buffers implemented in the new gRPC library
For the history #9718 shows some details about which tests
It's also concerning that only those tests failed 😱 |
This reverts commit f7b6017.
This reverts commit f7b6017.
* Revert "Don't free buffers after reading query stream (#9721)" This reverts commit f7b6017. * Revert: Upgrade to google.golang.org/grpc v1.66.2 / modify certain protobuf messages to retain their unmarshaling buffer (#9401) Signed-off-by: Yuri Nikolic <[email protected]> * Revert "Distributor.queryIngesterStream: Free gRPC buffers upon error (#9756)" This reverts commit eda1a4b. --------- Signed-off-by: Yuri Nikolic <[email protected]>
* [release-2.14] fix(deps): update github.com/thanos-io/objstore digest to f90c89a (main) (#9625) * Update github.com/thanos-io/objstore digest to f90c89a (#9534) Signed-off-by: Arve Knudsen <[email protected]> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> (cherry picked from commit 3c97a61) * update changelog Signed-off-by: Vladimir Varankin <[email protected]> --------- Signed-off-by: Vladimir Varankin <[email protected]> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Vladimir Varankin <[email protected]> * 2.14.1 Prepare patch release (#9796) * bump patch version Signed-off-by: Vladimir Varankin <[email protected]> * rebuild assets Signed-off-by: Vladimir Varankin <[email protected]> --------- Signed-off-by: Vladimir Varankin <[email protected]> * MQE: Fix handling of string results (#9803) This would previously panic after the query was closed * chore(deps): update grafana/mimirtool docker tag to v2.14.1 (#9806) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Revert upgrade to google.golang.org/grpc v1.66.2 (#9811) * Revert "Don't free buffers after reading query stream (#9721)" This reverts commit f7b6017. * Revert: Upgrade to google.golang.org/grpc v1.66.2 / modify certain protobuf messages to retain their unmarshaling buffer (#9401) Signed-off-by: Yuri Nikolic <[email protected]> * Revert "Distributor.queryIngesterStream: Free gRPC buffers upon error (#9756)" This reverts commit eda1a4b. --------- Signed-off-by: Yuri Nikolic <[email protected]> * Improve lock contention affecting read and write latencies during TSDB head compaction (cherry-pick Prometheus PR 15242) (#9822) * Cherry-pick Prometheus PR 15242 Signed-off-by: Marco Pracucci <[email protected]> * Added CHANGELOG entry Signed-off-by: Marco Pracucci <[email protected]> * Updated CHANGELOG Signed-off-by: Marco Pracucci <[email protected]> --------- Signed-off-by: Marco Pracucci <[email protected]> --------- Signed-off-by: Vladimir Varankin <[email protected]> Signed-off-by: Yuri Nikolic <[email protected]> Signed-off-by: Marco Pracucci <[email protected]> Co-authored-by: Grot (@grafanabot) <[email protected]> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Vladimir Varankin <[email protected]> Co-authored-by: Joshua Hesketh <[email protected]> Co-authored-by: Đurica Yuri Nikolić <[email protected]> Co-authored-by: Marco Pracucci <[email protected]>
What this PR does
While the write path has been carefully crafted to make sure that we don't keep references to the strings backed by arrays with data from grpc stream (because it would cause a memory leak), this doesn't seem to be the case in the query path, where some tests started failing after we started to reuse those backing arrays through the usage of memory buffers implemented in the new gRPC library.
This change reverts the buffer freeing, means that it won't be recycled (and will be garbage collected) to ensure data correctness, while we investigate where the data references are kept.
Which issue(s) this PR fixes or relates to
Follow up on #9401
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]
.about-versioning.md
updated with experimental features.