-
Notifications
You must be signed in to change notification settings - Fork 912
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Execute VerifyReplicationTasks as an individual activity (#4656)
<!-- Describe what has changed in this PR --> **What changed?** Divide GenerateAndVerifyReplicationTasks activity into two activities: GenerateReplicationTasks (reuse previous one) and VerifyReplicationTasks <!-- Tell your future self why have you made these changes --> **Why?** Based on cluster tests, GenerateReplicationTasks is expensive (10ms latency for `GenerateLastHistoryReplicationTasks` call). In previous implementation, VerificationTasks runs after GenerateReplicationTasks and we only get ~60 RPS for GenerateAndVerifyReplicationTasks. By dividing the two, we can achieve ~100 RPS VerifyReplicationTasks for a single activity (bottleneck is still GenerateReplicationTasks because of 10ms latency). Also moved the special handling of WF not_found on target to VerifyReplicationTasks, which reduced # of `DescribeMutableState` call on source cluster. In previous implementation, `DescribeMutableState` is called for every replication task. Now we only call `DescribeMutableState` if WF was not found on target (which should be rare for steady state). The downside is that we can potentially replicate Zombie WF from source to target. But it should be avoidable by eliminating Zombie during migration process (i.e., delete WF on target if migration is incomplete). <!-- How have you verified this change? Tested locally? Added a unit test? Checked in staging env? --> **How did you test it?** Unit test & cluster tests. <!-- Assuming the worst case, what can be broken when deploying this change to production? --> **Potential risks** Low, the feature is disabled by default and only affect force replication workflow. <!-- Is this PR a hotfix candidate or require that a notification be sent to the broader community? (Yes/No) --> **Is hotfix candidate?** No.
- Loading branch information
1 parent
9f9b172
commit d0974cd
Showing
5 changed files
with
349 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.