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(mimirtool): Make remote-read actually return data #10286

Merged
merged 5 commits into from
Dec 19, 2024
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
6 changes: 5 additions & 1 deletion pkg/mimirtool/commands/remote_read.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ import (
"github.com/grafana/mimir/pkg/mimirtool/client"
)

// DefaultChunkedReadLimit is the default value for the maximum size of the protobuf frame client allows.
// 50MB is the default. This is equivalent to ~100k full XOR chunks and average labelset.
const DefaultChunkedReadLimit = 5e+7

type RemoteReadCommand struct {
address string
remoteReadPath string
Expand Down Expand Up @@ -91,7 +95,7 @@ func (c *RemoteReadCommand) Register(app *kingpin.Application, envVars EnvVarNam
Default(now.Format(time.RFC3339)).
StringVar(&c.to)
cmd.Flag("read-size-limit", "Maximum number of bytes to read.").
Default(strconv.Itoa(int(math.Pow(1024, 2)))). // 1MiB
Default(strconv.Itoa(DefaultChunkedReadLimit)). // 1MiB
Uint64Var(&c.readSizeLimit)
}

Expand Down
Loading