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

!editorial: simplify pseudo code (recovery) #3384

Closed
wants to merge 1 commit into from

Conversation

mirjak
Copy link
Contributor

@mirjak mirjak commented Jan 22, 2020

Btw. shouldn't the weights be parameters and not fixed values (of 1/8 and 1/4)? And where does those values come from?

Btw. shouldn't the weights be parameters and not fixed values (of 1/8 and 1/4)? And where does those values come from?
@martinthomson martinthomson added -recovery editorial An issue that does not affect the design of the protocol; does not require consensus. labels Jan 22, 2020
@ianswett ianswett removed the editorial An issue that does not affect the design of the protocol; does not require consensus. label Jan 22, 2020
Copy link
Contributor

@ianswett ianswett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PTAL at #3350

adjusted_rtt = latest_rtt
if (min_rtt + ack_delay < latest_rtt):
adjusted_rtt = latest_rtt - ack_delay
adjusted_rtt = max(latest_rtt - ack_delay, min_rtt)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the pseudocode that results from #3350, so this change is not editorial

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, this is a functional change.

Prior to this you get latest_rtt or latest_rtt - ack_delay.

With this change you get min_rtt or latest_rtt - ack_delay.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ups, yes, you are right. I think I got that impression from reading "MUST NOT apply the adjustment if the resulting RTT sample is smaller than the min_rtt", however, that's not what it says.

I think changing the if to the following would be slightly more readable for me but doesn't make a big difference:

if (latest_rtt - ack_delay > min_rtt):

Or even

adjusted_rtt = latest_rtt - ack_delay
if (adjusted_rtt > min_rtt):
adjusted_rtt = latest_rtt

However, we can also just withdraw this PR.

@ianswett ianswett changed the title editorial: simplify pseudo code (recovery) !editorial: simplify pseudo code (recovery) Jan 23, 2020
@ianswett ianswett closed this Mar 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants