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

Limit viewchange timeout #2121

Merged
merged 2 commits into from
Oct 29, 2019
Merged

Limit viewchange timeout #2121

merged 2 commits into from
Oct 29, 2019

Conversation

ineiti
Copy link
Member

@ineiti ineiti commented Oct 28, 2019

The viewchange timeout was not handled correctly in case of very big
numbers. time.Duration(float64(1e100))*time.Second == 0s! So the
verification if duration < 0 was never true, and the viewchange
was reset to 0s!


🙅‍ Friendly checklist:

  • 0. Code comments are added (or updated) when/where needed and explain the WHY of the code.
  • 1. Design choices, user documentation and any additional doc are added (or updated) in READMEs.
  • 2. Any new behaviour is tested and small units of code that can be are unit tested.
  • 3. Code comments are added on tests to explain what they do.
  • 4. Errors are systematically wrapped with a meaningful message using xerrors.Errorf and the %v verb.
  • 5. Hard limit of 80 chars is always respected.
  • 6. Changes are backward compatible.
  • 7. Indentation level does not exceed 5, although 4 is already suspicious.
  • 8. Functions, files, and packages are kept to a manageable size and decomposed into smaller units if needed.
  • 9. There are no magic values.

The viewchange timeout was not handled correctly in case of very big
numbers. time.Duration(float64(1e100))*time.Second == 0s! So the
verification if duration < 0 never was true, and the viewchange
was reset to 0s...
@Gilthoniel Gilthoniel merged commit 16c14bb into master Oct 29, 2019
@Gilthoniel Gilthoniel deleted the viewchange branch October 29, 2019 12:34
jeffallen pushed a commit that referenced this pull request Oct 29, 2019
The viewchange timeout was not handled correctly in case of very big
numbers. time.Duration(float64(1e100))*time.Second == 0s! So the
verification if duration < 0 never was true, and the viewchange
was reset to 0s...

This is the v3 cherry-pick of #2121
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants