Skip to content

Reset backoff duration after successful connection. #871

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

Merged
merged 2 commits into from
Aug 10, 2024

Conversation

PIG208
Copy link
Member

@PIG208 PIG208 commented Aug 8, 2024

This fixes #554, and supersedes #564.

Copy link
Collaborator

@chrisbobbe chrisbobbe left a comment

Choose a reason for hiding this comment

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

Thanks! One comment below, and I'll also mark this for Greg's review.

Comment on lines 20 to 29
// probability < 1e-9. There are 2 * 11 assertions, and each one has a
// failure probability < 1e-12; see below.
// probability < 1e-9 for up to 1000 assertions.
// There are 2 * [expectedMaxDurationsInMs.length] assertions,
// and each one has a failure probability < 1e-12; see below.
Copy link
Collaborator

Choose a reason for hiding this comment

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

The part "for up to 1000 assertions" is new in this commit. What does it mean, and is there a logic change it corresponds to?

Copy link
Member Author

Choose a reason for hiding this comment

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

This commit allows an arbitrary number of expected durations to be passed, so the 1000 is here to convey how many expected values can be passed for the upper bound of 1e-9 to still hold.

@chrisbobbe chrisbobbe added the integration review Added by maintainers when PR may be ready for integration label Aug 8, 2024
@PIG208
Copy link
Member Author

PIG208 commented Aug 8, 2024

After having a discussion with Greg, we will drop the testing part of this because this change is easy to verify, but testing is complicated.

@gnprice
Copy link
Member

gnprice commented Aug 10, 2024

Thanks @PIG208, and thanks @chrisbobbe for the previous review!

Merging, with an additional commit adding a long comment:
cca6f24 store [nfc]: Explain why we reset backoff, and the trade-offs

@gnprice gnprice merged commit cca6f24 into zulip:main Aug 10, 2024
@PIG208 PIG208 deleted the backoff branch August 12, 2024 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration review Added by maintainers when PR may be ready for integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reset backoff interval after successful connection
3 participants