You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@pekko.apache.org by "He-Pin (via GitHub)" <gi...@apache.org> on 2025/07/11 07:48:36 UTC
[PR] chore: Make calculateDelay a public method. [pekko]
He-Pin opened a new pull request, #1940:
URL: https://github.com/apache/pekko/pull/1940
Motivation:
This method is useful.
btw, it maybe a problem to use the `ThreadLocalRandom.current()` when working with virtual thread.
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] chore: Make calculateDelay a public method. [pekko]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on code in PR #1940:
URL: https://github.com/apache/pekko/pull/1940#discussion_r2200216580
##########
actor/src/main/scala/org/apache/pekko/pattern/BackoffOptions.scala:
##########
@@ -255,6 +258,22 @@ object BackoffOpts {
maxBackoff: java.time.Duration,
randomFactor: Double): BackoffOnStopOptions =
onStop(childProps, childName, minBackoff.asScala, maxBackoff.asScala, randomFactor)
+
+ /**
+ * Calculates an exponential back off delay.
+ */
Review Comment:
could you add the `@since 1.2.0` here?
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] chore: Make calculateDelay a public method. [pekko]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on PR #1940:
URL: https://github.com/apache/pekko/pull/1940#issuecomment-3285292153
@He-Pin this is almost certainly the cause of https://github.com/apache/pekko-persistence-cassandra/issues/305
https://github.com/apache/pekko-persistence-cassandra/blob/c5e25aad476b2ba9a28d7be9aa11a213a6ca2004/core/src/main/scala/org/apache/pekko/persistence/cassandra/Retries.scala#L61
I think we'll need to add back BackoffSupervisor.calculateDelay for 1.2.1 and delegate it the new method.
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] chore: Make calculateDelay a public method. [pekko]
Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin commented on PR #1940:
URL: https://github.com/apache/pekko/pull/1940#issuecomment-3065457730
thanks for take care of this
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] chore: Make calculateDelay a public method. [pekko]
Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin commented on code in PR #1940:
URL: https://github.com/apache/pekko/pull/1940#discussion_r2202336218
##########
actor/src/main/scala/org/apache/pekko/pattern/BackoffOptions.scala:
##########
@@ -255,6 +258,22 @@ object BackoffOpts {
maxBackoff: java.time.Duration,
randomFactor: Double): BackoffOnStopOptions =
onStop(childProps, childName, minBackoff.asScala, maxBackoff.asScala, randomFactor)
+
+ /**
+ * Calculates an exponential back off delay.
+ */
Review Comment:
I see, totally missed that.
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] chore: Make calculateDelay a public method. [pekko]
Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin merged PR #1940:
URL: https://github.com/apache/pekko/pull/1940
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] chore: Make calculateDelay a public method. [pekko]
Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin commented on code in PR #1940:
URL: https://github.com/apache/pekko/pull/1940#discussion_r2202341300
##########
actor/src/main/scala/org/apache/pekko/pattern/BackoffOptions.scala:
##########
@@ -255,6 +258,22 @@ object BackoffOpts {
maxBackoff: java.time.Duration,
randomFactor: Double): BackoffOnStopOptions =
onStop(childProps, childName, minBackoff.asScala, maxBackoff.asScala, randomFactor)
+
+ /**
+ * Calculates an exponential back off delay.
+ */
Review Comment:
Do you think we should put it in RetrySupport or here? @pjfanning
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] chore: Make calculateDelay a public method. [pekko]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on PR #1940:
URL: https://github.com/apache/pekko/pull/1940#issuecomment-3061510581
mima issue:
ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.pattern.BackoffSupervisor.calculateDelay")
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org