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

Fixes a panic in the query-tee. #4465

Merged
merged 2 commits into from
Sep 7, 2021

Conversation

cyriltovena
Copy link
Contributor

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 [email protected]

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 <[email protected]>
Signed-off-by: Cyril Tovena <[email protected]>
Copy link
Contributor

@pstibrany pstibrany left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@alvinlin123 alvinlin123 merged commit 74055d8 into cortexproject:master 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 <[email protected]>

* update changelog.

Signed-off-by: Cyril Tovena <[email protected]>
Signed-off-by: Alvin Lin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants