-
Notifications
You must be signed in to change notification settings - Fork 869
fix: write failover history on the passive side #7443
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
fix: write failover history on the passive side #7443
Conversation
7133bd2 to
c4b907f
Compare
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.
refactored to EnableDomainAuditLogging
|
|
||
| // plus, we need to check whether the config version is <= the config version set in the input | ||
| // plus, we need to check whether the failover version is <= the failover version set in the input | ||
| existingDomain, err := h.domainManager.GetDomain(ctx, &persistence.GetDomainRequest{ |
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.
this gets mutated due to the substructs getting dereferenced and then edited, so it was necessary to deepcopy even though there's no actual editing of the existingDomain variable
c4b907f to
0df1086
Compare
Signed-off-by: David Porter <[email protected]>
Signed-off-by: David Porter <[email protected]>
- Create noopDomainAuditManager to satisfy DomainAuditManager interface - Update NewReplicationTaskExecutor calls with new signature - Pass EnableDomainAuditLogging dynamic property 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> Signed-off-by: David Porter <[email protected]>
0df1086 to
16b6782
Compare
Signed-off-by: David Porter <[email protected]>
|
|
||
| if existingDomain.ReplicationConfig.IsActiveActive() || task.ReplicationConfig.IsActiveActive() { | ||
| mergedActiveClusters, aaChanged := mergeActiveActiveScopes(existingDomain.ReplicationConfig.ActiveClusters, task.ReplicationConfig.ActiveClusters) | ||
| if intendedDomainState.ReplicationConfig.IsActiveActive() || task.ReplicationConfig.IsActiveActive() { |
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.
I'm confused by the places where we use intendedDomainState and other places where we use originalDomainState
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.
this is fair, let me annotate
50ab986
into
cadence-workflow:master
What changed?
I missed the remaining part of implementation of writing failover and domain updates to the domain audit log (the worker component just uses the manager directly rather than going to the domain handler). So this adds those logging options for passive side so that domain updates and failovers are recorded in both active and passive sides.
Unfortunately I'd not as heavily refactored the replication component, though it's fairly simple by comparison to the domain handler, so the update is fairly large.
Why?
How did you test it?
Potential risks
Release notes
Documentation Changes