Open dhiaayachi opened 2 months ago
Thank you for reporting this issue. This is a known issue that can lead to unbounded growth in mutable state.
We are currently working on a solution for this issue and will provide updates as they become available. In the meantime, you can work around this issue by implementing a custom signal deduplication mechanism in your workflow code.
Here are some resources that may be helpful:
Please let us know if you have any other questions.
Thank you for reporting this issue.
The MutableState
in Temporal currently maintains a map of signals with request_id
as their keys for deduplication purposes. This map can grow unbounded as signals from external sources (like the SignalWorkflow API) are received.
We understand the need for a solution to limit the size of this map. We are currently working on solutions to address this issue.
In the meantime, you can consider using the following workarounds:
MutableState
map. You can implement a custom cleanup logic that periodically removes entries from the MutableState
map, either based on a count limit or a TTL. We appreciate your feedback and will update you as we make progress on this issue.
Currently, mutable state maintain a map of signals with request_id as their keys and used it for dedup purpose. When the signal is coming from external (like received from SignalWorkflow API), those request_id stay in the map forever and never get cleaned up. We need to put some limit so this map does not grow unbounded, for example simple count limit or TTL based solution would work.