Create channel observer on probe reset. (#1783)

On a state change, it was possible an aborted probe was pending
finalize. When probe controller is reset, the probe channel
observer was not reset. Create a new non-probe channel observer
on state change to get a fresh start.

Also limit probe finalize wait to 10 seconds max. It is possible
that the estimate is very low and we have sent a bunch of probes.
Calculating wait based on that could lead to finalize waiting for
a long time (could be minutes).
This commit is contained in:
Raja Subramanian
2023-06-10 10:54:55 +05:30
committed by GitHub
parent 0e7bdeabcb
commit 4805dec1f0
2 changed files with 6 additions and 0 deletions
@@ -743,6 +743,8 @@ func (s *StreamAllocator) setState(state streamAllocatorState) {
// reset probe to enforce a delay after state change before probing
s.probeController.Reset()
// a fresh channel observer after state transition to get clean data
s.channelObserver = s.newChannelObserverNonProbe()
}
func (s *StreamAllocator) adjustState() {