mirror of
https://github.com/livekit/livekit.git
synced 2026-10-22 15:22:30 +00:00
Stop probe on probe controller reset (#2744)
This commit is contained in:
1 parent
410bf7c6ec
commit
3ad0a69c86
1 file changed
+6
-3
@@ -65,6 +65,7 @@ func (p *ProbeController) Reset() {
|
||||
p.resetProbeIntervalLocked()
|
||||
p.resetProbeDurationLocked()
|
||||
|
||||
p.StopProbe()
|
||||
p.clearProbeLocked()
|
||||
}
|
||||
|
||||
@@ -73,7 +74,7 @@ func (p *ProbeController) ProbeClusterDone(info ProbeClusterInfo) {
|
||||
defer p.lock.Unlock()
|
||||
|
||||
if p.probeClusterId != info.Id {
|
||||
p.params.Logger.Infow("not expected probe cluster", "probeClusterId", p.probeClusterId, "resetProbeClusterId", info.Id)
|
||||
p.params.Logger.Debugw("not expected probe cluster", "probeClusterId", p.probeClusterId, "resetProbeClusterId", info.Id)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -138,7 +139,9 @@ func (p *ProbeController) MaybeFinalizeProbe(
|
||||
return true, true, true
|
||||
}
|
||||
|
||||
if (isComplete || p.abortedProbeClusterId != ProbeClusterIdInvalid) && p.probeEndTime.IsZero() && p.doneProbeClusterInfo.Id != ProbeClusterIdInvalid && p.doneProbeClusterInfo.Id == p.probeClusterId {
|
||||
if (isComplete || p.abortedProbeClusterId != ProbeClusterIdInvalid) &&
|
||||
p.probeEndTime.IsZero() &&
|
||||
p.doneProbeClusterInfo.Id != ProbeClusterIdInvalid && p.doneProbeClusterInfo.Id == p.probeClusterId {
|
||||
// ensure any queueing due to probing is flushed
|
||||
// STREAM-ALLOCATOR-TODO: CongestionControlProbeConfig.SettleWait should actually be a certain number of RTTs.
|
||||
expectedDuration := float64(9.0)
|
||||
@@ -165,7 +168,7 @@ func (p *ProbeController) MaybeFinalizeProbe(
|
||||
}
|
||||
|
||||
if !p.probeEndTime.IsZero() && time.Now().After(p.probeEndTime) {
|
||||
// finalisze aborted or non-failing but non-goal-reached probe cluster
|
||||
// finalize aborted or non-failing but non-goal-reached probe cluster
|
||||
return true, p.finalizeProbeLocked(trend), false
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user