Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCC: RateController does not use the internal state #271

Open
N1cOs opened this issue Aug 9, 2024 · 1 comment · May be fixed by #296
Open

GCC: RateController does not use the internal state #271

N1cOs opened this issue Aug 9, 2024 · 1 comment · May be fixed by #296

Comments

@N1cOs
Copy link

N1cOs commented Aug 9, 2024

Your environment.

  • Version: v0.1.30

What did you do?

RateController on the delay stats update doesn't use the internals state. Should we make a transition from the internal state, not from the current one (which is always increase actually)? Snippet from the rate_controller.go :

func (c *rateController) onDelayStats(ds DelayStats) {
	now := time.Now()

	if !c.init {
		c.delayStats = ds
		c.delayStats.State = stateIncrease
		c.init = true
		return
	}
	c.delayStats = ds
	// Transition from the current state?
	c.delayStats.State = c.delayStats.State.transition(ds.Usage)

	if c.delayStats.State == stateHold {
		return
	}

	// ... more logic
}

What did you expect?

Using the internal state (smth like this):

func (c *rateController) onDelayStats(ds DelayStats) {
	now := time.Now()

	if !c.init {
		c.delayStats = ds
		c.delayStats.State = stateIncrease
		c.init = true
		return
	}
	
	prev := c.delayStats
	c.delayStats = ds
	c.delayStats.State = prev.State.transition(ds.Usage)

	if c.delayStats.State == stateHold {
		return
	}

	// ... more logic
}

What happened?

sterlingdeng pushed a commit to sterlingdeng/interceptor that referenced this issue Dec 20, 2024
This fixes an issue described in pion#271.
The original implementation did not transition rate controller states
properly.
@sterlingdeng sterlingdeng linked a pull request Dec 20, 2024 that will close this issue
sterlingdeng pushed a commit to sterlingdeng/interceptor that referenced this issue Dec 21, 2024
This fixes an issue described in pion#271.
The original implementation did not transition rate controller states
properly.
sterlingdeng pushed a commit to sterlingdeng/interceptor that referenced this issue Dec 21, 2024
This fixes an issue described in pion#271.
The original implementation did not transition rate controller states
properly.
sterlingdeng pushed a commit to sterlingdeng/interceptor that referenced this issue Dec 21, 2024
This fixes an issue described in pion#271.
The original implementation did not transition rate controller states
properly.
@sterlingdeng
Copy link
Contributor

I noticed this same issue when doing a port of GCC for QUIC and was looking at different implementations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants