We have a cadence-workflow cluster with the visibility store on Cassandra. This does not support advanced visibility features, so we would like to move to ElasticSearch. However the cluster is in active production use, so we would like to make the switch without downtime. To clarify "without downtime":
getResult
calls (Java client) which I believe uses the visibility features on the server side.Is this possible?
Yes, it's supported in Cadence. Below is the steps that you can use as references.
system.advancedVisibilityWritingMode:
- value: "dual"
system.enableReadVisibilityFromES:
- value: false
So that Cadence will write visibility to both stores, but continue to use basic visibility for read
You don't want to switch right away because the new store doesn't have enough data yet. Depends on the domain retention, or use case scenarios, you may switch to use read from advanced visibility later some time when you think it's okay to read only from advanced visibility.
system.advancedVisibilityWritingMode:
- value: "dual"
system.enableReadVisibilityFromES:
- value: false
- value: true
constraints:
domainName: "samples-domain-A"
- value: false
constraints:
domainName: "samples-domain-B"
This will let samples-domain-A
and samples-domain-B
to read from advanced visibility, and the rest continue to use basic visibility
system.advancedVisibilityWritingMode:
- value: "dual"
system.enableReadVisibilityFromES:
- value: true
When the previous steps are successful, you can deprecate the basic visibility. You can remove the db based visibility from config, and remove the dynamic config that used in above(when only advanced visibility is configured, Cadence will only write to and read from advanced visibility by default)