Repository navigation
[stage] Add Actor State TTL support - #1920
Closed
adityav1709 wants to merge 5 commits into
Closed
adityav1709 wants to merge 5 commits into
adityav1709 wants to merge 5 commits into
Conversation
Signed-off-by: Artur Souza <asouza.pro@gmail.com> Signed-off-by: Aditya Vijay <215045064+adityav1709@users.noreply.github.com>
Keep add(String, T) as it is and add an overload taking the expiration instead of changing the signature. No @deprecated on set(String, T) while ActorStateTTL is a preview feature; the TTL variant documents the preview flag and that the cache only knows the expiration when the store returns ttlExpireTime. Remove the unused imports in DaprStateAsyncProvider. Add unit tests for the ttlInSeconds and ttlExpireTime handling in DaprClientImpl. Signed-off-by: Aditya Vijay <215045064+adityav1709@users.noreply.github.com>
The testcontainers Configuration model had no way to enable a Dapr preview feature. Add a Feature value type (name + enabled), a features list on Configuration, and spec.features output in the YAML converter, so integration tests can turn on preview features such as ActorStateTTL. Signed-off-by: Aditya Vijay <215045064+adityav1709@users.noreply.github.com>
Cover the new actor state TTL support end to end: a new ActorStateTtlIT writes a value with a two second TTL, sees it served while the TTL holds, sees it gone from the actor cache once the TTL elapses, and after an app restart sees it gone from the store too. The test runs against MySQL instead of the Redis used by the other actor tests, because Redis does not return the ttlExpireTime of a state key. The ActorStateTTL preview feature is enabled through the new Configuration features support. The shared test infra gains a reused MySQL container and a mysqlStateStore helper, and the test actor gains a writeMessageWithTtl method. Signed-off-by: Aditya Vijay <215045064+adityav1709@users.noreply.github.com>
Signed-off-by: Aditya <adityav170920@gmail.com>
Author
|
Superseded by #1921, which has the same change with the DCO sign-off fixed on all commits. |
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.
Fixes #849.
This builds on #1338, rebased onto current master.
What it does
Tests
Caveat: the cache only knows a key expired when the store returns ttlExpireTime. Redis does not, so the MySQL test is the one that proves the expiry path.