LEEKYE commented on code in PR #35413: URL: https://github.com/apache/beam/pull/35413#discussion_r2243718434
########## sdks/go/pkg/beam/core/metrics/sampler.go: ########## @@ -21,28 +21,35 @@ import ( "time" "unsafe" + "github.com/apache/beam/sdks/v2/go/pkg/beam/internal/errors" "github.com/apache/beam/sdks/v2/go/pkg/beam/log" ) +// RestartLullTimeout is the minimum timeout for restarting the sdk harness if job option element_processing_timeout is set. +var ( + restartLullMinTimeoutDefault time.Duration = 10 * time.Minute +) + // StateSampler tracks the state of a bundle. type StateSampler struct { store *Store // used to store states into state registry millisSinceLastTransition time.Duration transitionsAtLastSample int64 nextLogTime time.Duration logInterval time.Duration + restartLullTimeout time.Duration } // NewSampler creates a new state sampler. -func NewSampler(store *Store) StateSampler { - return StateSampler{store: store, nextLogTime: 5 * time.Minute, logInterval: 5 * time.Minute} +func NewSampler(store *Store, elementProcessingTimeout string) StateSampler { Review Comment: DONE -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@beam.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org