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

rcmgr: Fix threshold calculation #1722

Merged
merged 1 commit into from
Aug 29, 2022
Merged

rcmgr: Fix threshold calculation #1722

merged 1 commit into from
Aug 29, 2022

Conversation

MarcoPolo
Copy link
Collaborator

@MarcoPolo MarcoPolo commented Aug 26, 2022

Fixes #1721

This changes the code to check for overflows and handle them.

This also adds a special case to check if the limit is MaxInt64 and return early since we assume this is an infinite limit (just to save a big int multiplication).

@mudler
Copy link
Contributor

mudler commented Aug 27, 2022

sorry to chime in here, but this PR solves quite some issues in a project of mine that it's based on libp2p. since I've tried to bump to latest I met various problems that I couldn't pin point easily in tests, hence I didn't opened any issue because I was still digging from my side.

That being said I've pinned to this PR and (almost) all tests went back to green:
before: https://github.com/mudler/edgevpn/actions/runs/2899789247
after: https://github.com/mudler/edgevpn/runs/8051539079?check_suite_focus=true

Just wanted to let you know, here looks good 👍 , thanks/kudos for fixing it!

Copy link
Contributor

@vyzo vyzo left a comment

Choose a reason for hiding this comment

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

i am surprised we actually hit this one.

@MarcoPolo MarcoPolo merged commit ae68d81 into master Aug 29, 2022
@MarcoPolo MarcoPolo deleted the marco/1721 branch August 29, 2022 17:14
dennis-tra added a commit to dennis-tra/nebula that referenced this pull request Oct 16, 2022
fixes resource manager infinite limits libp2p/go-libp2p#1722
juju812 added a commit to juju812/edgemesh that referenced this pull request Apr 1, 2023
burp go-libp2p to v0.23.0 to fix InfiniteLimits MaxInt64 overflow
refer to PR: libp2p/go-libp2p#1722
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Resource manager's InfiniteLimits are not infinite
3 participants