Fixes a panic in the query-tee.#4465
Merged
alvinlin123 merged 2 commits intocortexproject:masterfrom Sep 7, 2021
Merged
Conversation
This was happening because of a race. I've change the test suite to cover the code and the race detector shows it up. The panic: ``` panic: runtime error: index out of range [1] with length 1 goroutine 26118 [running]: github.com/cortexproject/cortex/tools/querytee.(*ProxyEndpoint).executeBackendRequests(0xc0003160c0, 0xc0002c2600, 0xc0004c44e0) /__w/cortex/cortex/tools/querytee/proxy_endpoint.go:122 +0x5a5 created by github.com/cortexproject/cortex/tools/querytee.(*ProxyEndpoint).ServeHTTP /__w/cortex/cortex/tools/querytee/proxy_endpoint.go:57 +0x25b ``` Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
alvinlin123
approved these changes
Sep 7, 2021
alvinlin123
pushed a commit
to ac1214/cortex
that referenced
this pull request
Jan 14, 2022
* Fixes a panic in the query-tee. This was happening because of a race. I've change the test suite to cover the code and the race detector shows it up. The panic: ``` panic: runtime error: index out of range [1] with length 1 goroutine 26118 [running]: github.com/cortexproject/cortex/tools/querytee.(*ProxyEndpoint).executeBackendRequests(0xc0003160c0, 0xc0002c2600, 0xc0004c44e0) /__w/cortex/cortex/tools/querytee/proxy_endpoint.go:122 +0x5a5 created by github.com/cortexproject/cortex/tools/querytee.(*ProxyEndpoint).ServeHTTP /__w/cortex/cortex/tools/querytee/proxy_endpoint.go:57 +0x25b ``` Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com> * update changelog. Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com> Signed-off-by: Alvin Lin <alvinlin@amazon.com>
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.
This was happening because of a race.
I've change the test suite to cover the code and the race detector shows it up.
The panic:
Signed-off-by: Cyril Tovena cyril.tovena@gmail.com