Skip to content

Repair by directory

Matthew Sevey requested to merge repair-loop into unstable

MERGE REQUEST

Changes to Work Flow

This MR updates the repair loop code to add a directory at a time instead of all the files. The key changes are the following:

  • managedWorstHealthDirectory was added to follow the path of the worst health and return the SiaPath of the directory with the worst health that needs to be repaired.
  • A new struct SiaDirHealth was created to more cleanly handle the passing around of the health values while calculating, updating, and retrieving the health of the SiaDirs
  • Chunks will be marked as stuck or not stuck during managedCleanUpUploadChunk by checking chunkComplete
  • threadedUploadLoop now checks for the worst health directory and passes that information into managedBuildChunkHeap. managedBuildChunkHeap then reads the files in the directory provided and adds those files to the repair heap

Additionally now that !3378 (merged) is merged, the All() method has been removed from the SiaFileSet.

Testing Updates

  • Added Test for managedWorstHealthDirectory

Modules and Packages Impacted

  • modules/renter
  • modules/renter/siadir
  • modules/renter/siafile
Edited by Matthew Sevey

Merge request reports