renterd icon indicating copy to clipboard operation
renterd copied to clipboard

Soft deletion for contracts

Open ChrisSchinnerl opened this issue 8 months ago • 0 comments

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.

ChrisSchinnerl avatar Jun 18 '24 15:06 ChrisSchinnerl