-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Conversation
Signed-off-by: Jacob Lisi <jacob.t.lisi@gmail.com>
Signed-off-by: Jacob Lisi <jacob.t.lisi@gmail.com>
fd5ee1f
to
9c87416
Compare
Signed-off-by: Jacob Lisi <jacob.t.lisi@gmail.com>
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
Would you mind making these consistently util_math
?
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.
👍
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.
Few nits, then LGTM
@@ -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" |
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.
"github.com/cortexproject/cortex/pkg/util/math" | |
util_math "github.com/cortexproject/cortex/pkg/util/math" |
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
n := math.Min(len(objects), readDBsParallelism) | |
n := util_math.Min(len(objects), readDBsParallelism) |
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
"github.com/cortexproject/cortex/pkg/util/math" | |
util_math "github.com/cortexproject/cortex/pkg/util/math" |
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
q := queries[i:math.Min(i+maxQueriesPerGoroutine, len(queries))] | |
q := queries[i:util_math.Min(i+maxQueriesPerGoroutine, len(queries))] |
Signed-off-by: Jacob Lisi <jacob.t.lisi@gmail.com>
What this PR does / why we need it: