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

Deprecate old namespace change callback #3774

Merged
merged 6 commits into from
Jan 7, 2023

Conversation

yycptt
Copy link
Member

@yycptt yycptt commented Jan 4, 2023

What changed?

  • Deprecate old namespace change callback and use new namespace state change callback

Why?

  • New task processing logic guarantees task execution and doesn't rely on handling namespace failover in an ordered fashion (based on namespace notification version)

How did you test it?

  • Existing test, will test failover/migration as well.

Potential risks

Is hotfix candidate?

@yycptt yycptt requested review from yux0 and yiminc January 4, 2023 19:45
@yycptt yycptt requested a review from a team as a code owner January 4, 2023 19:45
Comment on lines -275 to -284

// failover callback will try to create a failover queue processor to scan all inflight tasks
// if domain needs to be failovered. However, in the multicursor queue logic, the scan range
// can't be retrieved before the processor is started. If failover callback is registered
// before queue processor is started, it may result in a deadline as to create the failover queue,
// queue processor need to be started.
//
// Ideally, when both timer and transfer queues enabled single cursor mode, we don't have to register
// the callback. However, currently namespace migration is relying on the callback to UpdateHandoverNamespaces
e.registerNamespaceFailoverCallback()
Copy link
Member Author

Choose a reason for hiding this comment

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

This change is from Cadence (cadence-workflow/cadence#3494) and should not be picked. It only applies to cadence version of multi-cursor implementation which still has the concept for failover queue.

},
)
// for backward compatibility
_ = e.shard.UpdateNamespaceNotificationVersion(ns.NotificationVersion() + 1)
Copy link
Member Author

Choose a reason for hiding this comment

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

The impl of UpdateNamespaceNotificationVersion will make sure that stored notification version will never go back.

@yycptt yycptt merged commit 04ce8e3 into temporalio:master Jan 7, 2023
@yycptt yycptt deleted the deprecate-old-ns-change-callback branch January 7, 2023 00:43
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