Skip to content

Commit

Permalink
Update default read limit
Browse files Browse the repository at this point in the history
  • Loading branch information
julienduchesne committed Dec 19, 2024
1 parent a66bbbb commit 70c6510
Showing 1 changed file with 5 additions and 1 deletion.
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

0 comments on commit 70c6510

Please sign in to comment.