You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When starting server (i.e. with go.temporal.io/server/temporal.Server.Start) with system.forceSearchAttributesCacheRefreshOnRead dyn config as true and then using operator service immediately register search attributes, I should be able to start a workflow right away.
Actual Behavior
Sometimes the workflow fails with "Namespace default has no mapping defined for search attribute ". And when it does succeed, the logs have warnings like:
Start server programmatically with system.forceSearchAttributesCacheRefreshOnRead dyn config as true, then use OperatorService.AddSearchAttributes immediately to add attributes, then use client immediately to start workflow. Note, it works sometimes and fails others.
The text was updated successfully, but these errors were encountered:
## What changed?
<!-- Describe what has changed in this PR -->
Add search attributes param to sqlite.NewNamespaceConfig.
## Why?
<!-- Tell your future self why have you made these changes -->
Ability to start Temporal from the CLI with custom search attributes.
Address #6195
## How did you test it?
<!-- How have you verified this change? Tested locally? Added a unit
test? Checked in staging env? -->
Modified the CLI to not call `registerSearchAttributes`, pass it
directly to `NewNamespaceConfig`.
## Potential risks
<!-- Assuming the worst case, what can be broken when deploying this
change to production? -->
## Documentation
<!-- Have you made sure this change doesn't falsify anything currently
stated in `docs/`? If significant
new behavior is added, have you described that in `docs/`? -->
## Is hotfix candidate?
<!-- Is this PR a hotfix candidate or does it require a notification to
be sent to the broader community? (Yes/No) -->
<!--- Note to EXTERNAL Contributors -->
<!-- Thanks for opening a PR!
If it is a significant code change, please **make sure there is an open
issue** for this.
We work best with you when we have accepted the idea first before you
code. -->
<!--- For ALL Contributors 👇 -->
## What was changed
<!-- Describe what has changed in this PR -->
Fix register search attributes when starting server
## Why?
<!-- Tell your future self why have you made these changes -->
Currently, search attributes are registered after the server is ready,
which can cause race condition with other processes waiting for the
server to become ready too. This PR fixes this by registering the search
attributes together with the namespaces.
Address temporalio/temporal#6195
## Checklist
<!--- add/delete as needed --->
1. Closes <!-- add issue number here -->
2. How was this tested:
<!--- Please describe how you tested your changes/how we can test them
-->
3. Any docs updates needed?
<!--- update README if applicable
or point out where to update docs.temporal.io -->
Expected Behavior
When starting server (i.e. with
go.temporal.io/server/temporal.Server.Start
) withsystem.forceSearchAttributesCacheRefreshOnRead
dyn config astrue
and then using operator service immediately register search attributes, I should be able to start a workflow right away.Actual Behavior
Sometimes the workflow fails with "Namespace default has no mapping defined for search attribute ". And when it does succeed, the logs have warnings like:
Steps to Reproduce the Problem
Start server programmatically with
system.forceSearchAttributesCacheRefreshOnRead
dyn config astrue
, then useOperatorService.AddSearchAttributes
immediately to add attributes, then use client immediately to start workflow. Note, it works sometimes and fails others.The text was updated successfully, but these errors were encountered: