Fixed bug in exponential retry intervals#83
Conversation
|
@DannyIsYog could you please review this PR and the other's in this repo assigned to you? Thanks! |
DannyIsYog
left a comment
There was a problem hiding this comment.
Hey @britzl this looks good!
I just have a suggestions for a future PR.
I'm not very familiar with retries so I was looking at how it's done on our other sdks and noticed most (if not all) use retries with jitter. This is, if a large number of clients all start retrying a failed service at the same time, this predictable sequence can lead to a problem, where all clients hit the service simultaneously after the same delay, causing it to fail again, since the pattern is "predictable". To fix this, we should add a bit of randomness to this so to "spread" when the clients will re-hit the server.
You can see something like that for the Nakama Unity SDK
Let me know if this makes sense.
It totally does. I added an issue to track this: #86 |
| - uses: actions/checkout@v3 | ||
| name: Checkout project | ||
|
|
||
| - uses: leafo/gh-actions-lua@v9 |
There was a problem hiding this comment.
Seems like leafo/gh-actions-lua has some issues since a few months back. There's a PR to fix it but the author has not merged it. We might as well just install Lua using apt-get.
Fixed crash when creating an exponential retry interval. Also added tests for the retries.lua module.