Skip to content

Commit

Permalink
Merge pull request #1349 from authzed/fix-stream-read-timeout-typo
Browse files Browse the repository at this point in the history
fix typo in StreamReadTimeout option
  • Loading branch information
jakedt committed May 24, 2023
2 parents 91fca1c + 3848ee8 commit 2fb89c4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions internal/services/v1/experimental.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ func NewExperimentalServer(opts ...options.ExperimentalServerOptionsOption) v1.E
Msg("experimental server config specified invalid MaxExportBatchSize, setting to fallback")
config.MaxExportBatchSize = maxExportBatchSizeFallback
}
if config.StreamReadTimeount == 0 {
if config.StreamReadTimeout == 0 {
log.
Warn().
Stringer("specified", config.StreamReadTimeount).
Stringer("specified", config.StreamReadTimeout).
Stringer("fallback", streamReadTimeoutFallbackSeconds*time.Second).
Msg("experimental server config specified invalid StreamReadTimeount, setting to fallback")
config.StreamReadTimeount = streamReadTimeoutFallbackSeconds * time.Second
Msg("experimental server config specified invalid StreamReadTimeout, setting to fallback")
config.StreamReadTimeout = streamReadTimeoutFallbackSeconds * time.Second
}

return &experimentalServer{
Expand All @@ -77,7 +77,7 @@ func NewExperimentalServer(opts ...options.ExperimentalServerOptionsOption) v1.E
grpcvalidate.StreamServerInterceptor(true),
handwrittenvalidation.StreamServerInterceptor,
usagemetrics.StreamServerInterceptor(),
streamtimeout.MustStreamServerInterceptor(config.StreamReadTimeount),
streamtimeout.MustStreamServerInterceptor(config.StreamReadTimeout),
),
},
defaultBatchSize: uint64(config.DefaultExportBatchSize),
Expand Down
2 changes: 1 addition & 1 deletion internal/services/v1/options/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import "time"
//go:generate go run github.com/ecordell/optgen -output zz_generated.query_options.go . ExperimentalServerOptions

type ExperimentalServerOptions struct {
StreamReadTimeount time.Duration `debugmap:"visible" default:"600s"`
StreamReadTimeout time.Duration `debugmap:"visible" default:"600s"`
DefaultExportBatchSize uint32 `debugmap:"visible" default:"1_000"`
MaxExportBatchSize uint32 `debugmap:"visible" default:"100_000"`
}
10 changes: 5 additions & 5 deletions internal/services/v1/options/zz_generated.query_options.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2fb89c4

Please sign in to comment.