feat: add support for secondary visibility store (dual visibility)#839
Merged
robholland merged 8 commits intotemporalio:mainfrom Feb 4, 2026
Conversation
|
|
robholland
requested changes
Jan 22, 2026
Add support for secondaryVisibilityStore configuration to enable dual visibility feature in Temporal server. This allows writing to two visibility stores simultaneously for migration scenarios. Changes: - Add secondaryVisibilityStore support in temporal.persistence.filterConfig - Include secondaryVisibility in temporal.persistence.eachStore iteration - Add TEMPORAL_SECONDARY_VISIBILITY_STORE_PASSWORD env var to server pods - Automatically process secondary visibility store in schema jobs This implementation adapts PR temporalio#803 to the V1 chart architecture, leveraging the centralized helper functions introduced in V1 to avoid code duplication. Resolves: temporalio#803
Add helm-unittest tests to verify: - ConfigMap contains secondaryVisibilityStore configuration - Secondary visibility password uses correct env var placeholder - Environment variable is injected when secondaryVisibilityStore is configured - Environment variable is not injected when secondaryVisibilityStore is absent
Remove redundant check for in the conditional. When is empty, eq comparison will be false, making the extra 'and' check unnecessary.
Make getStoreByType return an empty dict when the store isn't configured, removing the need for special-case logic in eachStore. This treats secondaryVisibility consistently with other stores. This change: - Adds a check in getStoreByType to return empty dict if storeName is nil - Simplifies eachStore to use getStoreByType for all stores including secondary - Makes secondary visibility less of an exceptional case
1c6bb3f to
b222fc9
Compare
Remove unresolved conflict markers
robholland
requested changes
Jan 27, 2026
…ment Use getStoreByType for secondaryVisibility to be consistent with default and visibility stores. This removes special-case logic and makes the code cleaner by: - Using getStoreByType which returns empty dict when not configured - Checking $secondaryVisibilityStore variable instead of .Values path
robholland
approved these changes
Jan 27, 2026
Contributor
|
Looks good, please resolve conflicts and then I can get this merged. |
Contributor
|
Hey @ignaciogonzalezsomoza, please could you merge main, then I can get your PR merged :) |
Keep both tests: - Secondary visibility store for dual visibility (from this PR) - Metrics config (from upstream)
The secret name should include 'temporal-' prefix to match the template output.
Contributor
Author
|
|
Contributor
|
🎉 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds support for
secondaryVisibilityStoreconfiguration to enable the dual visibility feature in Temporal server. This allows writing to two visibility stores simultaneously, which is useful for migration scenarios (e.g., migrating from Cassandra to Elasticsearch for visibility).Changes
secondaryVisibilityStoresupport intemporal.persistence.filterConfigfunctiontemporal.persistence.eachStoreto include secondary visibility store in iterationTEMPORAL_SECONDARY_VISIBILITY_STORE_PASSWORDenvironment variable to server podssecondaryVisibilityStoreis configuredImplementation Details
This implementation leverages the V1 chart architecture's centralized helper functions, avoiding the code duplication present in PR #803 (which targeted v0.x). The key improvements:
temporal.persistence.filterConfigtemporal.persistence.eachStoresecondaryVisibilityStoreconfigured continue to work as beforeTesting
Tested in a development cluster with:
temporal_visibility_v1_dev)temporal_visibility_v1_dev_readonly)Verified that:
Related
Closes #803
This PR adapts the changes from #803 to the V1 chart structure, making them compatible with the refactored architecture introduced in the V1 release.
Documentation
Example configuration: