mirror of
https://github.com/temporalio/temporal.git
synced 2026-08-30 18:41:49 -07:00
## What changed? Introduce history.ReplicationStreamMaxLifetime (with a companion jitter coefficient) so the stream receiver gracefully recycles each replication stream after a bounded, jittered interval. When the lifetime elapses the receiver stops the stream and the stream receiver monitor reopens a fresh one, which can land on a different (non-draining) connection. ## Why? This lets proxies such as Envoy gracefully drain connections that would otherwise be pinned open indefinitely by endless replication streams, and bounds the number of outbound connections a history pod accumulates. Disabled by default (0). Receiver-side only; mirrors the existing livenessMonitor. Jitter is clamped to [0,1] to guard against a misconfigured dynamic value panicking backoff.Jitter. ## How did you test it? - [x] built - [x] run locally and tested manually - [x] covered by existing tests - [x] added new unit test(s) - [ ] added new functional test(s) --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>