filecoin-project / go-fil-markets

Shared Implementation of Storage and Retrieval Markets for Filecoin Node Implementations
Other
78 stars 59 forks source link

Limit the amount of information kept about old retrievals #760

Open dirkmc opened 1 year ago

dirkmc commented 1 year ago

Currently we store the state transitions for retrieval deals in the datastore in perpetuity. As retrievals increase in frequency this can become very large. We should put a configurable, soft limit of 7 days on the amount of detailed information we keep about retrieval deals. Probably the simplest mechanism would be to have a background process that periodically cleans up retrievals that are no longer active after the configured duration.

Separately we should also output a retrieval access log, similar to an http access log. The user can choose to rotate / backup this log as they see fit.