Throttle RTX under certain conditions to prevent RTX storm (#440)

* WIP commit

* WIP commit

* WIP commit

* WIP commit

* WIP commit

* WIP commit

* WIP commit

* WIP commit

* Clean up

* Remove debug

* Remove unneeded change

* fix test

* Remove incorrect comment

* WIP commit

* Reset probe after estimate trends down

* WIP commit

* variable name change

* Clean up

* Remove debug logs

* gofmt
This commit is contained in:
Raja Subramanian
2022-02-17 13:33:44 +05:30
committed by GitHub
parent 0bbed7f0bd
commit d04f4d12d1
4 changed files with 99 additions and 19 deletions
+3
View File
@@ -697,12 +697,15 @@ func (s *StreamAllocator) handleNewEstimateInProbe() {
// In rare cases, the estimate gets stuck. Prevent from probe running amok
// LK-TODO: Need more testing this here and ensure that probe does not cause a lot of damage
//
s.params.Logger.Debugw("probe: aborting, no trend")
s.abortProbe()
case trend == EstimateTrendDownward:
// stop immediately if estimate falls below the previously committed estimate, the probe is congesting channel more
s.params.Logger.Debugw("probe: aborting, estimate is trending downward")
s.abortProbe()
case s.probeEstimator.GetHighest() > s.probeGoalBps:
// reached goal, stop probing
s.params.Logger.Debugw("probe: stopping, goal reached")
s.stopProbe()
}
}