cadence-java-client icon indicating copy to clipboard operation
cadence-java-client copied to clipboard

Allow configure max cache size in bytes and evict workflows when consumption exceeding configured value

Open longquanzheng opened this issue 3 years ago • 1 comments

The cacheSize is by number of workflow threads and there is no config as total size of memory consumed. This makes it very hard to manage the memory. The only way today is to monitor on avg historySize.

Also, there is no proactive pruning mechanism to evict workflows today. Ideally we should let users configure a total cache size, and evict the workflows when the memory consumption is exceeding the configured size.

longquanzheng avatar May 16 '22 20:05 longquanzheng

Good suggestion @longquanzheng , will look into this when I have some time.

mindaugasbarcauskas avatar Nov 30 '22 12:11 mindaugasbarcauskas