-
Notifications
You must be signed in to change notification settings - Fork 757
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
Refactor ndc history resender to handle multiple remote clusters #2866
Conversation
@@ -66,6 +67,7 @@ type ( | |||
// NewTaskExecutor creates a replication task executor | |||
// The executor uses by 1) DLQ replication task handler 2) history replication task processor | |||
func NewTaskExecutor( | |||
remoteCluster string, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should the remoteCluster
be the active cluster from namespace cache?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the question is why we still have one replication task executor for each remote cluster, I think we can refactor that too and have only one executor? cc @yux0
If it's about why not letting xdc resender itself figure out the remote cluster name from ns cache, then I thought about it as well. The main concern is that if the caller can't control which remote cluster the resender is talking to, there might be a mismatch between caller and resender. E.g. when caller is replication task executor for cluster A, the resend may resend from cluster B. Another example is in standby timer/transfer task executor, we may connect to cluster A to refresh task, but may resend history from cluster B. It's rare but will make behavior reasoning much harder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the question is why we still have one replication task executor for each remote cluster, I think we can refactor that too and have only one executor?
Yes. We can do this
What changed?
Why?
How did you test it?
Potential risks
Is hotfix candidate?