He-Pin opened a new pull request, #3266: URL: https://github.com/apache/pekko/pull/3266
### Motivation Issue #3233 reports that `pekko.pattern.retry` invokes the attempt function `N + 1` times for `attempts = N`. Investigation shows that this matches the established Akka/Pekko behavior: `attempts` is the number of retries after the first attempt, not the total number of invocations. Some Scaladoc/Javadoc text described it as the maximum number of attempts, which made the API contract ambiguous. ### Modification Clarify the Scala and Java retry documentation and futures guide to describe `attempts` as the maximum number of retries after the first attempt. Add focused Scala and Java assertions for the existing behavior, including `attempts = 0` performing the initial attempt without retries. ### Result The documented contract now matches the existing retry behavior without changing runtime logic. ### Tests - `scalafmt --mode diff-ref=origin/main` / passed - `scalafmt --list --mode diff-ref=origin/main` / passed - `git diff --check` / passed - `sbt "actor-tests / Test / testOnly org.apache.pekko.pattern.RetrySpec"` / passed - `sbt "actor-tests / Test / testOnly org.apache.pekko.pattern.PatternsTest"` / passed - Qoder stdout review with `/tmp/pekko-3233-qoder-review.diff` / No must-fix findings - `docs/paradox` / Not run - user requested text check only ### References Refs #3233 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
