python-sdk icon indicating copy to clipboard operation
python-sdk copied to clipboard

Preview Feature Support: Add Actor State TTL support

Open JoshVanL opened this issue 2 years ago • 3 comments

Add first class API support for Actor State TTL https://github.com/dapr/dapr/issues/5899

A dedicated function to Actor State should be created. Psudo code: func (key string, value string, ttl duration). It should be made clear in the SDK documentation/comments that users should always use this function, unless they have specifically created some kind of Actor State clean up out of band of Dapr or don't have an issue with the Actor State store keep state and grow "forever".

Please see the go-sdk for implementation reference.

JoshVanL avatar Apr 25 '23 17:04 JoshVanL

UPDATE: Due to the nature of the current implementation of write through caching of actor state and the unavailability of the real TTL expire time of state keys, SDKs will have an inconsistent view of the world when it has a cold cache and the state store has TTL keys. The TTL functionality has been put behind a feature gate in daprd. See https://github.com/dapr/dapr/pull/6400 for more details. This feature is expected to be moved to GA in 1.12.

JoshVanL avatar May 25 '23 11:05 JoshVanL

At this point the SDK support will not be added until Dapr 1.12 (SDK release 1.11)

berndverst avatar May 30 '23 16:05 berndverst

@berndverst Is this issue still needed to be worked on?

dasanind avatar Dec 13 '23 22:12 dasanind

/assign

KentHsu avatar Apr 27 '24 09:04 KentHsu