Currently the blobs are only deleted after the whole workflow's history are deleted (all runs -- including runs from continueAsNew, reset and IDReusePolicy).
This is the safest way, mainly because Temporal/Dex support "Reset/TimeTravel" API to go back to any previous point of the history.
But this could potentially lead to some extra storage cost that user may want to optimize.
E.g. if user can accept that they won't reset to any point before X days ago, then we can delete the blobs more aggresively -- we could find the closed runs that closed more than X days ago, if any of the blobs are no longer be used in next run, then they can be safely deleted.
Currently the blobs are only deleted after the whole workflow's history are deleted (all runs -- including runs from continueAsNew, reset and IDReusePolicy).
This is the safest way, mainly because Temporal/Dex support "Reset/TimeTravel" API to go back to any previous point of the history.
But this could potentially lead to some extra storage cost that user may want to optimize.
E.g. if user can accept that they won't reset to any point before X days ago, then we can delete the blobs more aggresively -- we could find the closed runs that closed more than X days ago, if any of the blobs are no longer be used in next run, then they can be safely deleted.