LEEKYE commented on code in PR #35120: URL: https://github.com/apache/beam/pull/35120#discussion_r2140368933
########## sdks/java/harness/src/main/java/org/apache/beam/fn/harness/control/ExecutionStateSampler.java: ########## @@ -80,6 +82,7 @@ public class ExecutionStateSampler { .toFormatter(); private final int periodMs; private final MillisProvider clock; + private final int lullTimeMinuteForRestart; Review Comment: DONE ########## sdks/java/harness/src/main/java/org/apache/beam/fn/harness/control/ExecutionStateSampler.java: ########## @@ -357,6 +390,15 @@ private void takeSample(long currentTimeMillis, long millisSinceLastSample) { transitionsAtLastSample = transitionsAtThisSample; } else { long lullTimeMs = currentTimeMillis - lastTransitionTimeMillis.get(); + + if (userAllowedTimeoutForRestart && lullTimeMs > userAllowedLullTimeMsForRestart) { + throw new RuntimeException( 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