Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-cursor: fix scheduled task precision issue #3255

Merged
merged 1 commit into from
Aug 22, 2022

Conversation

yycptt
Copy link
Member

@yycptt yycptt commented Aug 19, 2022

What changed?

  • Please check the in-line comment

Why?

  • Please check the in-line comment

How did you test it?

  • Tested in test cluster

Potential risks

Is hotfix candidate?

@yycptt yycptt requested a review from yiminc August 19, 2022 19:47
@yycptt yycptt requested a review from a team as a code owner August 19, 2022 19:47
// This however, moves task visibility time forward for 1ms and may cause timer tasks to be skipped
// during processing. To compensate for that, add 1ms back when scheduling the task in reader.go.
for _, task := range resp.Tasks {
task.SetVisibilityTime(task.GetVisibilityTime().Truncate(scheduledTaskPrecision))
Copy link
Member

Choose a reason for hiding this comment

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

does it make sense to handle this in task deserializer? Or even truncate the visibility time before we encode it into blob?

@yycptt yycptt merged commit 5f4f30d into temporalio:master Aug 22, 2022
@yycptt yycptt deleted the multi-cursor-fix-timer-precision branch August 22, 2022 17:11
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