Skip to content

Commit c20f951

Browse files
address comments
1 parent 6ac39b6 commit c20f951

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

common/activecluster/types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const (
4444
)
4545

4646
// Manager is the interface for active cluster manager.
47-
// It is used to lookup active cluster, cluster name and failover versions.
47+
// It is used to lookup region, active cluster, cluster name and failover version etc.
4848
// This was introduced to support active-active domains.
4949
// It encapsulates the logic to lookup the active cluster for all kinds of domains. Most other components should use this interface instead of cluster metadata directly.
5050
// It is also used to notify components when there's an external entity change. History engine subscribes to these updates similar to domain change notifications.

docs/design/active-active/active-active.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ The main drawbacks of Active-Passive approach are:
3333

3434
## Design
3535

36-
Active-active domains are a new mode of isolation where domain is active in multiple clusters but individual workflows are only active in one cluster at any given time. Users can create workflows in any of the active clusters under the same domain. Each workflow will be considered active in of the domain's active clusters. The per-workflow active cluster selection mechanism will be dynamic/extensible to support different strategies.
36+
Active-active domains are a new mode of isolation where domain is active in multiple clusters but individual workflows are only active in one cluster at any given time. Users can create workflows in any of the active clusters under the same domain. Each workflow will be considered active in one of the domain's active clusters. The per-workflow active cluster selection mechanism will be dynamic/extensible to support different strategies.
3737

3838
Before diving into the details of active-active domains design, let's look at how active-passive domains work at high level. Then we will cover how active-active domains will be implemented in follow up sections.
3939

@@ -82,7 +82,7 @@ There's no "region" concept in Cadence today. However, with active-active domain
8282

8383
![Active-Active One Cluster Per Region](./active-active-one-cluster-per-region.png)
8484

85-
The underlying reason for these constraints is mainly to reuse existing failover version to cluster mapping that relies on failover versions. By restricting active-active domains to have only one active cluster per region, we can reuse the failover version mapping mechanism to determine the active cluster of a workflow.
85+
The underlying reason for these constraints is mainly to reuse existing failover version to cluster mapping that relies on failover versions. By restricting active-active workflows of active-active domains to have only one active cluster per region, we can reuse the failover version mapping mechanism to determine the active cluster of a workflow.
8686

8787
Active-active domains do NOT have a failover version in the database because "activeness" is not a property of a domain. Instead, workflows of active-active domains will be associated with an "entity" which has a failover version based on the region.
8888

@@ -153,8 +153,8 @@ Workflow start request determines which cluster selection strategy to be used.
153153
| Has active-region.lookup-key | Has active-region.origin | Strategy |
154154
|------------------------------|-------------------------|----------|
155155
| No | No | Type 1 |
156-
| Yes | No | Type 1 |
157-
| No | Yes | Type 2 |
156+
| No | Yes | Type 1 |
157+
| Yes | No | Type 2 |
158158

159159
If none of the new parameters are set, the default behavior is to pick the cluster that received the start workflow request.
160160
It's not allowed to have both active-region.lookup-key and active-region.origin set.

service/history/replication/metrics_emitter_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,8 @@ func (t testShardData) GetClusterMetadata() cluster.Metadata {
140140
func newClusterMetadata(t *testing.T) cluster.Metadata {
141141
return cluster.NewMetadata(
142142
config.ClusterGroupMetadata{
143-
FailoverVersionIncrement: 1,
144-
PrimaryClusterName: cluster1,
145-
CurrentClusterName: cluster1,
143+
PrimaryClusterName: cluster1,
144+
CurrentClusterName: cluster1,
146145
ClusterGroup: map[string]config.ClusterInformation{
147146
cluster1: {Enabled: true},
148147
cluster2: {Enabled: true},

0 commit comments

Comments
 (0)