Add function to get custom search attributes mapper in namespace registry #4317
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.
What changed?
Added function to get custom search attributes mapper in namespace registry capable of bypassing the cache if the dynamic config
system.forceSearchAttributesCacheRefreshOnRead
is set to true.Why?
#4017
The purpose of the dynamic config is to be able to immediately use the search attributes after being created. However, due to how they work differently when using SQL databases, this flag was a no-op in this case, only working when using Elasticsearch as visibility store.
How did you test it?
Started Temporal Server with MySQL, created search attributes, and immediately after started an workflow using the newly created search attributes. Before, it was always failing due to the namespace registry refresh interval. Now, if I set the dynamic config to
true
, it works.Potential risks
No.
Is hotfix candidate?
No.