Skip to content

Record activity retry timestamps after backoff - #3237

Open
pcbeingused333 wants to merge 1 commit into
temporalio:mainfrom
pcbeingused333:fix/activity-retry-scheduled-time
Open

pcbeingused333 wants to merge 1 commit into
temporalio:mainfrom
pcbeingused333:fix/activity-retry-scheduled-time

Conversation

@pcbeingused333

Copy link
Copy Markdown
Contributor

Fixes #1069

The in-memory test server waits for the configured retry backoff, but it records the retry's scheduled timestamp when the previous attempt fails. As a result, ActivityInfo.getCurrentAttemptScheduledTimestamp() can report a time before the retry is eligible to run.

Set the timestamp when the retry timer fires and the server queues the new attempt. The activity retry policy and public API stay the same.

With a ten-second backoff, the regression test measured only 20 ms between the two scheduled timestamps on main. It passes with the fix using ./gradlew --offline :temporal-sdk:test --tests io.temporal.activity.ActivityRetryScheduledTimestampTest. spotlessApply also completed successfully.

AI assistance was used to prepare this change.

@pcbeingused333
pcbeingused333 requested a review from a team as a code owner November 25, 2026 07:02

This branch has not been deployed

No deployments
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.

TestWorkflowEnvironment schedules the first activity retry immediately

1 participant