Skip to content

chore: Make calculateDelay a public method.#1940

Merged
He-Pin merged 3 commits intoapache:mainfrom
He-Pin:backoff
Jul 12, 2025
Merged

chore: Make calculateDelay a public method.#1940
He-Pin merged 3 commits intoapache:mainfrom
He-Pin:backoff

Conversation

@He-Pin
Copy link
Member

@He-Pin He-Pin commented Jul 11, 2025

Motivation:

This method is useful.
btw, it maybe a problem to use the ThreadLocalRandom.current() when working with virtual thread.

@He-Pin He-Pin requested review from mdedetrich and pjfanning July 11, 2025 07:48
@He-Pin He-Pin added this to the 1.2.0-M2 milestone Jul 11, 2025
@pjfanning
Copy link
Member

pjfanning commented Jul 11, 2025

mima issue:
ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.pattern.BackoffSupervisor.calculateDelay")

@He-Pin He-Pin force-pushed the backoff branch 3 times, most recently from eb8a8bb to 29f318a Compare July 12, 2025 06:14
Copy link
Member

@pjfanning pjfanning left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@He-Pin He-Pin merged commit 0199e84 into apache:main Jul 12, 2025
9 checks passed
@He-Pin He-Pin deleted the backoff branch July 12, 2025 13:34
@He-Pin
Copy link
Member Author

He-Pin commented Jul 12, 2025

thanks for take care of this

@pjfanning
Copy link
Member

@He-Pin this is almost certainly the cause of apache/pekko-persistence-cassandra#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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants