-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[Workflow] Workflow actor state should be saved with a TTL of -1 #6475
Comments
The default behavior of Dapr components is to not set a TTL if the TTL is unset. |
@clintsinger or @olitomlinson would you be able to comment further on this issue? This was originally discussed on Discord, and my understanding was that there could be a default/global TTL configuration placed on state stores. I didn't actually do the work to verify this, though. |
I think the problem here is that TTLs can be set completely external to Dapr, depending on the chosen state technology I.e. in CosmosDb, you can set a default TTL which applies to any document in the container. So, as @berndverst suggests, setting ttl to |
@olitomlinson yes, in the case of Cosmos DB you can set a default TTL and in that case you must set -1 to override it. I do not believe any other database we support has the same behavior. IMHO this is not a Workflows issue but rather we just need to document that people shouldn't enable TTLs with a default value in Cosmos DB. |
This issue has been automatically marked as stale because it has not had activity in the last 60 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue, help wanted or triaged/resolved) or other activity occurs. Thank you for your contributions. |
This issue has been automatically closed because it has not had activity in the last 67 days. If this issue is still valid, please ping a maintainer and ask them to label it as pinned, good first issue, help wanted or triaged/resolved. Thank you for your contributions. |
/keep-alive |
👋 @rabollin, my apologies but I can't perform this action for you because your username is not in the allowlist in the file |
Marking as P2 since this may be a corner case. There's also discussion of excluding Azure Cosmos DB from the list of supported workflow state stores, and it seems that may be the only state store potentially impacted. |
In what area(s)?
What version of Dapr?
Expected Behavior
The Dapr Workflow engine should save actor state with a TTL of -1 to ensure any global TTL configuration doesn't cause workflow state to be lost, even if the actor state store has a default TTL specified.
Note that there is some discussion about whether or not TTLs should ever be configured for actor state stores here: #3658. Either way, the internal workflow actors should defend against this.
Actual Behavior
Workflow actor state is saved without specifying any TTL, making it vulnerable to state store configurations with TTLs configured.
Steps to Reproduce the Problem
Release Note
RELEASE NOTE: FIX Prevent actor TTL configuration from disrupting workflows
The text was updated successfully, but these errors were encountered: