Update actor state store docs to include strong consistency requirement (#4766)

* Update actor state store docs to include strong consistency requirement

Signed-off-by: Jonathan Collinge <jonathancollinge@live.com>

* Move consistency to independent sentence

Signed-off-by: Jonathan Collinge <jonathancollinge@live.com>

---------

Signed-off-by: Jonathan Collinge <jonathancollinge@live.com>
Co-authored-by: Mark Fussell <markfussell@gmail.com>
Co-authored-by: Marc Duiker <marcduiker@users.noreply.github.com>
This commit is contained in:
Joni Collinge 2025-09-06 00:26:19 +01:00 committed by GitHub
parent 4a9ece2109
commit ae4b5de2e2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -95,7 +95,7 @@ You can group write, update, and delete operations into a request, which are the
### Actor state ### Actor state
Transactional state stores can be used to store actor state. To specify which state store to use for actors, specify value of property `actorStateStore` as `true` in the state store component's metadata section. Actors state is stored with a specific scheme in transactional state stores, allowing for consistent querying. Only a single state store component can be used as the state store for all actors. Read the [state API reference]({{% ref state_api.md %}}) and the [actors API reference]({{% ref actors_api.md %}}) to learn more about state stores for actors. Transactional state stores can be used to store actor state. To specify which state store to use for actors, specify value of property `actorStateStore` as `true` in the state store component's metadata section. Actors state is stored with a specific scheme in transactional state stores, allowing for consistent querying. Only a single state store component can be used as the state store for all actors. If your state store is backed by a distributed database, you must make sure that it provides strong consistency. Read the [state API reference]({{% ref state_api.md %}}) and the [actors API reference]({{% ref actors_api.md %}}) to learn more about state stores for actors.
#### Time to Live (TTL) on actor state #### Time to Live (TTL) on actor state
You should always set the TTL metadata field (`ttlInSeconds`), or the equivalent API call in your chosen SDK when saving actor state to ensure that state eventually removed. Read [actors overview]({{% ref actors-overview.md %}}) for more information. You should always set the TTL metadata field (`ttlInSeconds`), or the equivalent API call in your chosen SDK when saving actor state to ensure that state eventually removed. Read [actors overview]({{% ref actors-overview.md %}}) for more information.

View File

@ -544,7 +544,7 @@ curl -X POST http://localhost:3500/v1.0/state/starwars/transaction \
## Configuring state store for actors ## Configuring state store for actors
Actors don't support multiple state stores and require a transactional state store to be used with Dapr. [View which services currently implement the transactional state store interface]({{% ref "supported-state-stores.md" %}}). Actors don't support multiple state stores and require a transactional state store to be used with Dapr. [View which services currently implement the transactional state store interface]({{% ref "supported-state-stores.md" %}}). If your state store is backed by a distributed database, you must make sure that it provides strong consistency.
Specify which state store to be used for actors with a `true` value for the property `actorStateStore` in the metadata section of the `statestore.yaml` component file. Specify which state store to be used for actors with a `true` value for the property `actorStateStore` in the metadata section of the `statestore.yaml` component file.
For example, the following components yaml will configure Redis to be used as the state store for Actors. For example, the following components yaml will configure Redis to be used as the state store for Actors.