Skip to content

Refactor history task key #6919

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

Merged
merged 1 commit into from
May 15, 2025
Merged

Refactor history task key #6919

merged 1 commit into from
May 15, 2025

Conversation

Shaddoll
Copy link
Member

What changed?
A large but simple refactoring for history task key type:

  • We must use provided methods to create new history task key
  • History task key is now immutable
  • Set scheduled time to unix 0 timestamp for immediate task key

Why?
This is to prevent misuse of history task key. Especially for immediate task key, when we store the key into database, we convert the timestamp to unix nanoseconds. To unify the logic of type conversion for immediate task key and scheduled task key, we set the scheduled time of immediate keys to unix 0 timestamp to avoid handling zero timestamp in golang.

How did you test it?
unit tests

Potential risks

Release notes

Documentation Changes

@Shaddoll Shaddoll merged commit 5de16f8 into cadence-workflow:master May 15, 2025
24 checks passed
@Shaddoll Shaddoll deleted the task branch May 15, 2025 17:32
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