renterd icon indicating copy to clipboard operation
renterd copied to clipboard

Add `host_sectors` table for sectors uploaded to temporary storage

Open ChrisSchinnerl opened this issue 4 months ago • 2 comments

Before we get started with RHP4 in our upload code, we will need a new host_sectors table which maps all sectors to the host that they should be uploaded to. That way, we can track sectors which are uploaded but not part of a contract yet.

This will require at least the following changes:

  1. when an object is added to the bus, add a link to host_sectors for every sector.
  2. when an object is fetched from the bus, sectors which are uploaded but not linked to a contract should appear in the response with an empty slice of contract ids

Later, when we add upload pinning, we will be able to join sectors over both the contract_sectors as well as host_sectors to figure out which sectors still require pinning.

ChrisSchinnerl avatar Sep 29 '24 12:09 ChrisSchinnerl