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

Fix/deadlock frontend queue #1490

Merged
merged 4 commits into from
Jan 8, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
bound concurrency by min(parallelism,jobs)
  • Loading branch information
owen-d committed Jan 8, 2020
commit 14d97f7c89e8423a7176d2b090465b09535b8b1c
8 changes: 7 additions & 1 deletion pkg/querier/queryrange/split_by_interval.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,13 @@ func (h *splitByInterval) Process(

ch := h.Feed(ctx, input)

for i := 0; i < parallelism; i++ {
// don't spawn unnecessary goroutines
var p int = parallelism
if len(input) < parallelism {
p = len(input)
}

for i := 0; i < p; i++ {
go h.loop(ctx, ch)
}

Expand Down