{"action":"created","issue":{"url":"https://api.github.com/repos/reactor/reactor-addons/issues/164","repository_url":"https://api.github.com/repos/reactor/reactor-addons","labels_url":"https://api.github.com/repos/reactor/reactor-addons/issues/164/labels{/name}","comments_url":"https://api.github.com/repos/reactor/reactor-addons/issues/164/comments","events_url":"https://api.github.com/repos/reactor/reactor-addons/issues/164/events","html_url":"https://github.com/reactor/reactor-addons/issues/164","id":352869013,"node_id":"MDU6SXNzdWUzNTI4NjkwMTM=","number":164,"title":"Backoff calculation throws ArithmeticException after many iterations","user":{"login":"chringwer","id":4804673,"node_id":"MDQ6VXNlcjQ4MDQ2NzM=","avatar_url":"https://avatars1.githubusercontent.com/u/4804673?v=4","gravatar_id":"","url":"https://api.github.com/users/chringwer","html_url":"https://github.com/chringwer","followers_url":"https://api.github.com/users/chringwer/followers","following_url":"https://api.github.com/users/chringwer/following{/other_user}","gists_url":"https://api.github.com/users/chringwer/gists{/gist_id}","starred_url":"https://api.github.com/users/chringwer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chringwer/subscriptions","organizations_url":"https://api.github.com/users/chringwer/orgs","repos_url":"https://api.github.com/users/chringwer/repos","events_url":"https://api.github.com/users/chringwer/events{/privacy}","received_events_url":"https://api.github.com/users/chringwer/received_events","type":"User","site_admin":false},"labels":[{"id":321067064,"node_id":"MDU6TGFiZWwzMjEwNjcwNjQ=","url":"https://api.github.com/repos/reactor/reactor-addons/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/reactor/reactor-addons/milestones/21","html_url":"https://github.com/reactor/reactor-addons/milestone/21","labels_url":"https://api.github.com/repos/reactor/reactor-addons/milestones/21/labels","id":3405292,"node_id":"MDk6TWlsZXN0b25lMzQwNTI5Mg==","number":21,"title":"3.1.x Maintenance Backlog","description":"Issues that we'd like to fix in the next maintenance release of the `3.1.x` line. Fixes shipped with 3.1.x releases must always be released in the more recent lines as well.","creator":{"login":"simonbasle","id":6986166,"node_id":"MDQ6VXNlcjY5ODYxNjY=","avatar_url":"https://avatars0.githubusercontent.com/u/6986166?v=4","gravatar_id":"","url":"https://api.github.com/users/simonbasle","html_url":"https://github.com/simonbasle","followers_url":"https://api.github.com/users/simonbasle/followers","following_url":"https://api.github.com/users/simonbasle/following{/other_user}","gists_url":"https://api.github.com/users/simonbasle/gists{/gist_id}","starred_url":"https://api.github.com/users/simonbasle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonbasle/subscriptions","organizations_url":"https://api.github.com/users/simonbasle/orgs","repos_url":"https://api.github.com/users/simonbasle/repos","events_url":"https://api.github.com/users/simonbasle/events{/privacy}","received_events_url":"https://api.github.com/users/simonbasle/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":0,"state":"open","created_at":"2018-06-06T15:20:32Z","updated_at":"2018-08-22T09:52:40Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2018-08-22T09:18:25Z","updated_at":"2018-08-22T09:55:38Z","closed_at":null,"author_association":"NONE","body":"In case of a repeat with an exponential backoff the next delay will always be calculated based on the current iteration no matter which maximum value has been set.\r\n\r\nhttps://github.com/reactor/reactor-addons/blob/a440eb7de190603321b0c5737cc36e568be9418a/reactor-extra/src/main/java/reactor/retry/Backoff.java#L94\r\n\r\nAfter 63 iterations or less (depending on the initial value and factor) that will result in the following exception:\r\n```\r\njava.lang.ArithmeticException: Exceeds capacity of Duration: 9223372036854775808000000000\r\n\tat java.time.Duration.create(Duration.java:1006) ~[?:1.8.0_162]\r\n\tat java.time.Duration.multipliedBy(Duration.java:963) ~[?:1.8.0_162]\r\n\tat reactor.retry.Backoff$3.apply(Backoff.java:94) ~[reactor-extra-3.1.6.RELEASE.jar:3.1.6.RELEASE]\r\n\tat reactor.retry.Backoff$3.apply(Backoff.java:91) ~[reactor-extra-3.1.6.RELEASE.jar:3.1.6.RELEASE]\r\n\tat reactor.retry.AbstractRetry.calculateBackoff(AbstractRetry.java:68) ~[reactor-extra-3.1.6.RELEASE.jar:3.1.6.RELEASE]\r\n\tat reactor.retry.DefaultRepeat.repeatBackoff(DefaultRepeat.java:113) ~[reactor-extra-3.1.6.RELEASE.jar:3.1.6.RELEASE]\r\n\tat reactor.retry.DefaultRepeat.lambda$apply$1(DefaultRepeat.java:106) ~[reactor-extra-3.1.6.RELEASE.jar:3.1.6.RELEASE]\r\n```\r\n\r\nOnce the current value is greater than max we should just set `nextBackoff` to `maxBackoff` and skip the computation."},"comment":{"url":"https://api.github.com/repos/reactor/reactor-addons/issues/comments/414978921","html_url":"https://github.com/reactor/reactor-addons/issues/164#issuecomment-414978921","issue_url":"https://api.github.com/repos/reactor/reactor-addons/issues/164","id":414978921,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNDk3ODkyMQ==","user":{"login":"simonbasle","id":6986166,"node_id":"MDQ6VXNlcjY5ODYxNjY=","avatar_url":"https://avatars0.githubusercontent.com/u/6986166?v=4","gravatar_id":"","url":"https://api.github.com/users/simonbasle","html_url":"https://github.com/simonbasle","followers_url":"https://api.github.com/users/simonbasle/followers","following_url":"https://api.github.com/users/simonbasle/following{/other_user}","gists_url":"https://api.github.com/users/simonbasle/gists{/gist_id}","starred_url":"https://api.github.com/users/simonbasle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonbasle/subscriptions","organizations_url":"https://api.github.com/users/simonbasle/orgs","repos_url":"https://api.github.com/users/simonbasle/repos","events_url":"https://api.github.com/users/simonbasle/events{/privacy}","received_events_url":"https://api.github.com/users/simonbasle/received_events","type":"User","site_admin":false},"created_at":"2018-08-22T09:55:38Z","updated_at":"2018-08-22T09:55:38Z","author_association":"CONTRIBUTOR","body":"Thanks for the report @chringwer. Would you be willing to try a PR against the `3.1.x` branch?\r\n\r\nIn reactor/reactor-core#1122 I introduced an operator directly in core that does exponential backoff. It is most probably suffering from the same issue so I'll need to investigate that."}}
{"actor":{"display_login":"simonbasle"}}