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

api.SearchLogQueryHandler is not thread safe. #997

Closed
Tracked by #1005
var-sdk opened this issue Aug 23, 2022 · 2 comments
Closed
Tracked by #1005

api.SearchLogQueryHandler is not thread safe. #997

var-sdk opened this issue Aug 23, 2022 · 2 comments
Assignees
Labels
bug Something isn't working ga_candidate Proposed blocking issue for GA release

Comments

@var-sdk
Copy link

var-sdk commented Aug 23, 2022

Description

There are a couple of instances where slices are appended to inside of goroutines. e.g.

https://github.com/sigstore/rekor/blob/main/pkg/api/entries.go#L356

and

https://github.com/sigstore/rekor/blob/main/pkg/api/entries.go#L356

Appends to slices are not thread-safe. Instead allocating the entire slice and assigning by index would work instead as in e.g.

https://github.com/sigstore/rekor/blob/main/pkg/api/entries.go#L356

This would mean post-filtering nils to construct response payload.

Version

@var-sdk var-sdk added the bug Something isn't working label Aug 23, 2022
@haydentherapper haydentherapper added the ga_candidate Proposed blocking issue for GA release label Aug 25, 2022
@cdris
Copy link

cdris commented Aug 26, 2022

Can't assign myself, but I'll put in a pr for this.

@bobcallaway
Copy link
Member

fixed by #1006

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ga_candidate Proposed blocking issue for GA release
Projects
None yet
Development

No branches or pull requests

4 participants