Automatic Cleanup of Stale, Non-Finite Transfer Processes to Prevent Vault Overflow #5175
Replies: 2 comments
-
Hi @marctuerke thanks for raising this discussion. This functionality is already available in EDC in the form of policy monitor which checks the open transfers and run the policy engine in the policy monitor context. A bundled policy function that runs in the policy monitor context is already available in EDC docs here which can be used to set the validity of a contract. Once it expires If it's not suitable you can develop a custom policy function that works in the policy monitor context and do other custom checks Let me know if this helps Thanks |
Beta Was this translation helpful? Give feedback.
-
I would add that having long-running transfer processes is a best practice. It should be more common for transfers to be non-finite (streaming, API access) than finite and open for an extended period of time. Closing these processes based on an arbitrary timeout should not be done. Instead, track and close them when finished or no longer needed. @wolf4ood outlined one way to do that. Another way is to have a user or client application do this. Either way, if resources are being leaked, it is likely the transfers are not being modeled correctly. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This discussion proposes a new feature to improve the lifecycle management of non-finite transfer processes and address their impact on the Vault due to stale Endpoint Data References (EDRs).
The Problem
Our Vault is progressively filling up with secrets associated with EDRs generated by non-finite transfer processes.
To provide context, the DSP specification makes a clear distinction between finite and non-finite transfer processes:
This design works perfectly for finite transfers. Once the data is transmitted, the process completes, and the associated EDR secret is correctly removed from the Vault.
The challenge arises with non-finite transfers. As per the spec, these processes remain active indefinitely. In practice, a consumer might abandon a stream without explicitly terminating the transfer process. In this scenario, the process remains active, and its corresponding EDR secret is never automatically cleaned up from the Vault.
This leads to an accumulation of "stale" but technically active processes and their unused EDR secrets, which can eventually cause the Vault to reach its storage limit, requiring manual intervention.
The Proposal
I propose the introduction of a mechanism to automatically complete stale, non-finite transfer processes.
The core idea is as follows:
A background task in the EDC would periodically scan for these stale processes.
Once a process is identified as stale, the EDC would automatically transition it to a final state (e.g., COMPLETED or TERMINATED). This transition would trigger the existing cleanup logic, removing the associated EDR secret from the Vault. This feature should ideally be configurable, allowing operators to:
Benefits
I'm looking forward to hearing the community's thoughts and feedback on this proposal.
Thank you
Beta Was this translation helpful? Give feedback.
All reactions