Hi,
All types of state also have a method clear() that clears the state for the
currently active key, i.e. the key of the input element.
Could we call the `clear()` method directly to remove the state under the
specified key?

Best,
JING ZHANG


narasimha <swamy.haj...@gmail.com> 于2021年8月31日周二 上午9:44写道:

> Hi,
>
> I have a use case where the keyed state is managed (create, reset) by
> dynamically changing rules. New action "delete" has to be added.
> Delete is to completely delete the keyed state, same as how StateTTL does
> post expiration time.
>
> Use StateTTL?
>
> Initially used StateTTL, but it ended up in increasing the CPU usage even
> with low traffic.
> The state gets updated ~>50 times a second, and read multiple times in a
> second, so the time against state entry is getting updated often.
>
> So I didn't find it to be a viable solution.
>
> Can someone please help on how Keyed State can be removed outside of
> StateTTL.
>
> --
> A.Narasimha Swamy
>

Reply via email to