-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
update vendored cortex and add new replace overrides #3256
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
Signed-off-by: Jacob Lisi <jacob.t.lisi@gmail.com>
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -11,6 +11,7 @@ import ( | |||||
"github.com/cortexproject/cortex/pkg/chunk" | ||||||
chunk_util "github.com/cortexproject/cortex/pkg/chunk/util" | ||||||
"github.com/cortexproject/cortex/pkg/util" | ||||||
"github.com/cortexproject/cortex/pkg/util/math" | ||||||
"github.com/go-kit/kit/log/level" | ||||||
"go.etcd.io/bbolt" | ||||||
|
||||||
|
@@ -90,7 +91,7 @@ func (t *table) compact() error { | |||||
|
||||||
errChan := make(chan error) | ||||||
readObjectChan := make(chan string) | ||||||
n := util.Min(len(objects), readDBsParallelism) | ||||||
n := math.Min(len(objects), readDBsParallelism) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would you mind making these consistently There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
// read files parallelly | ||||||
for i := 0; i < n; i++ { | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -7,7 +7,7 @@ import ( | |||||
|
||||||
"github.com/cortexproject/cortex/pkg/chunk" | ||||||
chunk_util "github.com/cortexproject/cortex/pkg/chunk/util" | ||||||
"github.com/cortexproject/cortex/pkg/util" | ||||||
"github.com/cortexproject/cortex/pkg/util/math" | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
) | ||||||
|
||||||
const maxQueriesPerGoroutine = 100 | ||||||
|
@@ -34,7 +34,7 @@ func DoParallelQueries(ctx context.Context, tableQuerier TableQuerier, queries [ | |||||
errs := make(chan error) | ||||||
|
||||||
for i := 0; i < len(queries); i += maxQueriesPerGoroutine { | ||||||
q := queries[i:util.Min(i+maxQueriesPerGoroutine, len(queries))] | ||||||
q := queries[i:math.Min(i+maxQueriesPerGoroutine, len(queries))] | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
go func(queries []chunk.IndexQuery) { | ||||||
errs <- tableQuerier.MultiQueries(ctx, queries, callback) | ||||||
}(q) | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.