Skip to content

removed blanket timestamp wrapping (time-skipping fix) - #11635

Merged
feiyang3cat merged 1 commit into
temporalio:mainfrom
feiyang3cat:debug-timeskipping-fix-1
Aug 19, 2026
Merged

removed blanket timestamp wrapping (time-skipping fix)#11635
feiyang3cat merged 1 commit into
temporalio:mainfrom
feiyang3cat:debug-timeskipping-fix-1

Conversation

@feiyang3cat

@feiyang3cat feiyang3cat commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

What changed?

  • Removed blanket timestamp wrapping
  • cron/retry/start child wf use virtual time directly

Why?

there was a double-shifting for CaN but not for other cases
it shall be fixed unifying the clock used by all virtual time propagating cases, and this PR chooses to unify in a way that all cases propagate use virtual time

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 force-pushed the debug-timeskipping-fix-1 branch 2 times, most recently from f0c5c71 to 487d3e8 Compare August 19, 2026 05:49
ms.wrapTimeSourceWithTimeSkipping()
ms.wrapExecutionTimes(initialSkip)

@feiyang3cat feiyang3cat Aug 19, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

for reviewers:

We standardize on callers using virtual time directly when generating execution timestamps. (The opposite approach could also work.) In either way, the previous implementation was incorrect because it shifted timestamps during initialization even though continue-as-new already supplied virtual time.

@feiyang3cat
feiyang3cat force-pushed the debug-timeskipping-fix-1 branch 7 times, most recently from e10675c to 2237bdf Compare August 19, 2026 06:53
@@ -1671,7 +1672,7 @@ func (t *transferQueueActiveTaskExecutor) signalExternalExecution(
return err
}

func (t *transferQueueActiveTaskExecutor) startWorkflow(
func (t *transferQueueActiveTaskExecutor) startChildWorkflow(

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

for reviewers:

it seems the original name is confusing and this method is designed purely for child wf and will panic if attributes is nil

@feiyang3cat
feiyang3cat force-pushed the debug-timeskipping-fix-1 branch 2 times, most recently from 9192d75 to 0e7f8af Compare August 19, 2026 07:03
@@ -1719,6 +1719,12 @@ func (t *transferQueueActiveTaskExecutor) startWorkflow(
TimeSkippingConfig: attributes.GetTimeSkippingConfig(),
}

statePropagation := attributes.GetTimeSkippingStatePropagation()
nowForExpirationAndBackoff := workflow.AdjustNowWithTimeSkipping(

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

for reviewers: the long name is to help indicate for the request there is actually no start time adjusted so the changes in create_workflow_util.go is not duplicate

@feiyang3cat
feiyang3cat force-pushed the debug-timeskipping-fix-1 branch from 0e7f8af to be6d32c Compare August 19, 2026 07:05
@feiyang3cat
feiyang3cat marked this pull request as ready for review August 19, 2026 07:06
@feiyang3cat
feiyang3cat requested a review from a team August 19, 2026 07:06
@feiyang3cat
feiyang3cat requested review from a team as code owners August 19, 2026 07:06
@feiyang3cat
feiyang3cat force-pushed the debug-timeskipping-fix-1 branch from be6d32c to 7359dd0 Compare August 19, 2026 07:12
@feiyang3cat
feiyang3cat merged commit 5b410fa into temporalio:main Aug 19, 2026
54 checks passed
davidporter-id-au pushed a commit to davidporter-id-au/temporal that referenced this pull request Aug 24, 2026
)

## What changed?

- Removed blanket timestamp wrapping
- cron/retry/start child wf use virtual time directly

## Why?
there was a double-shifting for CaN but not for other cases
it shall be fixed unifying the clock used by all virtual time
propagating cases, and this PR chooses to unify in a way that all cases
propagate use virtual time

## How did you test it?
- [x] built
- [ ] run locally and tested manually
- [x] covered by existing tests
- [x] added new unit test(s)
- [x] added new functional test(s)
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.

3 participants