-
Notifications
You must be signed in to change notification settings - Fork 8
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
Regression in 0.0.2 when Unlimited bandwidth is used #4
Comments
Bug reported upstream efarrer/iothrottler#4
Bug reported upstream efarrer/iothrottler#4
@jkowalski Thank you for the detailed report and sorry I introduced a regression. I'm investigating fixes and will hopefully have a fix soon. |
Is there any update on this? I like to keep all my dependencies on latest versons but I can't upgrade iothrottler until this is fixed. |
@jkowalski I apologize for the delay in addressing this. I'm going to chalk this one up to COVID fog. I discovered that my refactor was misguided, it made the code more efficient, but also it didn't work ;). I've reverted the refactor and added the above test case as a regression test so I won't break it (that way) in the future. I've pushed out v0.0.3 which is the same as v0.0.1 but with the above test code. There are some improvements that I can make, but this at least allows you to upgrade your dependencies to the latest. |
I've noticed some of my tests started failing after upgrading to
0.0.2
andiothrottler
was on stack traces of many failures:https://github.com/kopia/kopia/runs/2156615830?check_suite_focus=true
and those tests all use
Unlimited
bandwidth.I think there's a bug due to integer overflow. The easiest repro I could find is this to add some real-time sleep:
With this I got the failure on third
assertTransmitTime()
I did not look too deeply, but I think the overflow is in
useBandwidth()
:int((secondsElapsed * int64(pool.bandwidth)) - pool.bandwidthUsed)
if
secondsElapsed > 0
it will overflow int64 range.FWIW this seems to fix it:
but it's probably not the right fix (won't work for
Unlimited - 1
for example) and there are many more corner cases.I'm going to revert Kopia to 0.0.1 for now, will be happy to test any fixes here.
BTW thanks for this library, it is really easy to use!
The text was updated successfully, but these errors were encountered: