Repair by directory
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 theSiaPath
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 theSiaDirs
- Chunks will be marked as stuck or not stuck during
managedCleanUpUploadChunk
by checkingchunkComplete
-
threadedUploadLoop
now checks for the worst health directory and passes that information intomanagedBuildChunkHeap
.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