You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This bug was hilarious - never was able to find it on the build server because the system up time for each build agent is small (they're created on-demand,) but it's come up every time I've tried to run the Akka.Remote test suite on dev on my local machine since #1174 was merged in.
ThrottlerTransportAdapter_must_maintain_average_message_rate would fail, repeatedly, every time.
The reason we have an OverflowException occur here is because _nanoTimeOfLastSend is set to 0 on the first calculation, so the result of nanoTimeOfSend - _nanoTimeOfLastSend is equal to the entire system up time on the first calculation, which causes the OverflowException when we attempt to cast down to an int.
Way to fix this is to set the _nanoTimeOfLastSend equal to the current MontonicClock.Ticks value when the TokenBucket is created. That way the delta is going to be something smaller (like, seconds worth of ticks) that can be downcast.
The text was updated successfully, but these errors were encountered:
This bug was hilarious - never was able to find it on the build server because the system up time for each build agent is small (they're created on-demand,) but it's come up every time I've tried to run the Akka.Remote test suite on
dev
on my local machine since #1174 was merged in.ThrottlerTransportAdapter_must_maintain_average_message_rate
would fail, repeatedly, every time.Here's the issue:
The reason we have an
OverflowException
occur here is because_nanoTimeOfLastSend
is set to 0 on the first calculation, so the result ofnanoTimeOfSend - _nanoTimeOfLastSend
is equal to the entire system up time on the first calculation, which causes theOverflowException
when we attempt to cast down to anint
.Way to fix this is to set the
_nanoTimeOfLastSend
equal to the currentMontonicClock.Ticks
value when theTokenBucket
is created. That way the delta is going to be something smaller (like, seconds worth of ticks) that can be downcast.The text was updated successfully, but these errors were encountered: