-
Notifications
You must be signed in to change notification settings - Fork 556
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
Distributor.queryIngesterStream: Free gRPC buffers upon error #9756
Merged
Conversation
This file contains 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
colega
reviewed
Oct 28, 2024
Signed-off-by: Arve Knudsen <[email protected]>
Signed-off-by: Arve Knudsen <[email protected]>
59c3ea9
to
d17921b
Compare
colega
reviewed
Oct 28, 2024
colega
approved these changes
Oct 29, 2024
4 tasks
duricanikolic
added a commit
that referenced
this pull request
Nov 4, 2024
* 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]>
aknuds1
added a commit
that referenced
this pull request
Nov 4, 2024
* [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]>
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.
What this PR does
In
Distributor.queryIngesterStream
, free gRPC buffers when an error occurs in thequeryIngester
closure that gets passed toring.DoMultiUntilQuorumWithoutSuccessfulContextCancellation
. No attempt is made to free the buffers though if querying is successful, as the combined query response should retain references to said buffers. I add a comment for future reference as to why we don't free buffers in the success case.See #9721 for background, as it reverts the
Distributor.queryIngesterStream
gRPC buffer freeing introduced in #9401 (due to race conditions essentially, as the combined query response retains gRPC buffer references).I've run the
TestBothEnginesReturnSameResultsForBenchmarkQueries
tests in pkg/streamingpromql/benchmarks with race detection enabled, and no problems are found.Which issue(s) this PR fixes or relates to
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]
.about-versioning.md
updated with experimental features.