temporalio / temporal

Temporal service
https://docs.temporal.io
MIT License
11.14k stars 799 forks source link

Add support for a "final workflow state retention" on successful exit optimization #6255

Open ghaskins opened 1 month ago

ghaskins commented 1 month ago

Is your feature request related to a problem? Please describe.

Many of our workflows process a decent amount of activity data and conclude with a short final status. We like the retention window to preserve de-duplication but don't need the full history for successfully exited workflows. However, Temporal naturally stores the full history for the entire retention window, wasting space in Cassandra.

Describe the solution you'd like

One solution to the above dilemma would be offering the ability to configure the system (perhaps on a per-workflow definition or invocation basis) where the developer indicates that the full history is unnecessary for successful workflows. When enabled, the workflow ID and final state would remain available for de-duplication and final-state retrieval, but the rest of the history (or at least the larger parts, such as data payloads) could be optimized out of storage.

Per-SDK Tickets

cretz commented 1 month ago

This seems like a server/platform request as opposed to using the issue template for a cross-SDK request in the features repo. I am transferring to the server repository. If something like this is built and there does need to be some kind of SDK exposure of the option, we can open a separate issue then.

yiminc commented 1 month ago

This would be similar to https://github.com/temporalio/temporal/issues/487