renterd
renterd copied to clipboard
Soft deletion for contracts
Archiving contracts can take a long time and lock the database up for many seconds. To avoid that we should merge contracts
and archived_contracts
into a single table with an archived
column.
That way, renewing a contract will remain the same except that the archived contract is inserted into contracts
.
Archiving a contract that expired will just update the archived
column and then delete sectors in batches.