Skip to content

Add active clusters config to domain schema #6945

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

Conversation

taylanisikdemir
Copy link
Member

@taylanisikdemir taylanisikdemir commented May 22, 2025

What changed?

  • Added active cluster config to domain replication config type in Cassandra. It's a blob column which corresponds to types.ActiveClusters serialized. SQL stores already serialize the whole domain info so no schema change there.
  • Updated domain handlers for active-active domains. More e2e testing on this will be added later.

Detailed Description
[In-depth description of the changes made to the schema or interfaces, specifying new fields, removed fields, or modified data structures]

CREATE TYPE domain_replication_config (
  active_cluster_name text,
  clusters            list<frozen<cluster_replication_config>>,
  active_clusters_config blob,                       -- new field
  active_clusters_config_encoding text,      -- new field
);

Impact Analysis

  • Backward Compatibility: [Analysis of backward compatibility]
    It's not backward compatible so we are not going to start populating this field until DB schema is upgraded and no rollbacks anticipated.
  • Forward Compatibility: [Analysis of forward compatibility]

Testing Plan

  • Unit Tests: [Do we have unit test covering the change?]
    Added/updated relevant unit tests to cover the new fields as well as absence of new fields.

Added extra test cases to UpdateDomain handler for active-active cases.

  • Persistence Tests: [If the change is related to a data type which is persisted, do we have persistence tests covering the change?]
    No changes
  • Integration Tests: [Do we have integration test covering the change?]
    No changes
  • Compatibility Tests: [Have we done tests to test the backward and forward compatibility?]
    Not needed.

Rollout Plan

  • What is the rollout plan?
    Land the change, create prerelease and run schema upgrade tool before deploying the new version

  • Does the order of deployment matter?
    As usual, first apply DB schema change then deploy binary.

  • Is it safe to rollback? Does the order of rollback matter?
    It's safe to rollback the code changes because it's not going to be used anytime soon.

  • Is there a kill switch to mitigate the impact immediately?
    Rollback.

@taylanisikdemir taylanisikdemir marked this pull request as ready for review May 23, 2025 00:39
@taylanisikdemir taylanisikdemir changed the title Add active clusters config to domain schema [WIP] Add active clusters config to domain schema May 25, 2025
@taylanisikdemir taylanisikdemir force-pushed the taylan/active_active_db_schema branch from 66d3dfd to b027382 Compare May 27, 2025 21:37
@taylanisikdemir taylanisikdemir changed the title [WIP] Add active clusters config to domain schema Add active clusters config to domain schema May 27, 2025
@Shaddoll
Copy link
Member

Does persistence tests cover the change?

@taylanisikdemir
Copy link
Member Author

Does persistence tests cover the change?

They cover domain crud operations but not activeclusters field updates. let me add a few cases there

@taylanisikdemir taylanisikdemir merged commit 647beb9 into cadence-workflow:master May 28, 2025
25 checks passed
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