BWE reset for probing. (#3295)
This commit is contained in:
@@ -688,12 +688,15 @@ func (s *StreamAllocator) handleSignalFeedback(event Event) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *StreamAllocator) handleSignalPeriodicPing(Event) {
|
func (s *StreamAllocator) handleSignalPeriodicPing(Event) {
|
||||||
// if pause is allowed, there may be no packets sent and BWE could be congested state,
|
// if pause is allowed, there may be no packets sent and BWE could be in congested state,
|
||||||
// reset BWE if that persists for a while
|
// reset BWE if that persists for a while
|
||||||
if s.state == streamAllocatorStateDeficient && s.params.Pacer.TimeSinceLastSentPacket() > s.params.Config.PausedMinWait {
|
if s.allowPause && s.state == streamAllocatorStateDeficient && s.params.BWE.CongestionState() != bwe.CongestionStateNone && s.params.Pacer.TimeSinceLastSentPacket() > s.params.Config.PausedMinWait {
|
||||||
s.params.Logger.Infow("stream allocator: resetting bwe to enable probing")
|
s.params.Logger.Infow("stream allocator: resetting bwe to enable probing")
|
||||||
s.maybeStopProbe()
|
s.maybeStopProbe()
|
||||||
s.params.BWE.Reset()
|
s.params.BWE.Reset()
|
||||||
|
|
||||||
|
// as BWE is reset, there is no finalizing for active cluster, so reset active cluster id
|
||||||
|
s.activeProbeClusterId = ccutils.ProbeClusterIdInvalid
|
||||||
}
|
}
|
||||||
|
|
||||||
if s.activeProbeClusterId != ccutils.ProbeClusterIdInvalid {
|
if s.activeProbeClusterId != ccutils.ProbeClusterIdInvalid {
|
||||||
@@ -872,6 +875,8 @@ func (s *StreamAllocator) setState(state streamAllocatorState) {
|
|||||||
s.maybeStopProbe()
|
s.maybeStopProbe()
|
||||||
|
|
||||||
s.params.BWE.Reset()
|
s.params.BWE.Reset()
|
||||||
|
|
||||||
|
s.activeProbeClusterId = ccutils.ProbeClusterIdInvalid
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user