Skip to content

fix activity and workflow task time-skipping clock boundaries - #12960

Open
feiyang3cat wants to merge 2 commits into
temporalio:mainfrom
feiyang3cat:fix-tsk-clock-boundaries
Open

feiyang3cat wants to merge 2 commits into
temporalio:mainfrom
feiyang3cat:fix-tsk-clock-boundaries

Conversation

@feiyang3cat

@feiyang3cat feiyang3cat commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

What changed?

Use the workflow’s virtual clock when rescheduling activities through reset/unpause operations and determining whether pending activities are waiting for retry backoff.

Convert workflow task scheduled/started timestamps to real time before comparing them with physical timeout task timestamps for best-effort deletion.

Why?

After time skipping, the workflow’s virtual clock differs from the shard’s real clock. Mixing these clocks can:

  • Reschedule activities in the past, bypassing jitter delays and potentially causing premature schedule-to-start timeouts.
  • Report activities as waiting for retry backoff even though their retry time has passed.
  • Incorrectly include long workflow task timeout tasks in best-effort deletion, bypassing the two-minute limit.

These issues also apply after time skipping is disabled because the accumulated offset remains.

How did you test it?

  • built
  • run locally and tested manually
  • covered by existing tests
  • added new unit test(s)
  • added new functional test(s)

@feiyang3cat
feiyang3cat marked this pull request as ready for review November 6, 2026 01:49
@feiyang3cat
feiyang3cat requested review from a team as code owners November 6, 2026 01:49
@feiyang3cat feiyang3cat changed the title Fix activity and workflow task time-skipping clock boundaries fix activity and workflow task time-skipping clock boundaries Nov 6, 2026

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant