Skip to content

Mark healthy chunks as unstuck

Matthew Sevey requested to merge mark-healthy-chunks-as-unstuck into unstable

NEW FEATURE

Description of Feature

This MR creates MarkHealthyChunkAsUnstuck as a way to prune the siafile and ensure that the chunks are marked as stuck appropriately.

Description of Work Flow

Currently through the repair process there are multiple places that a chunk can be marked as stuck. Some times a chunk could get marked as stuck due to it not being accessible, and then the next time the chunk is accessed it is healthy. To avoid this causing issues the health loop code will call MarkHealthyChunksAsUnstuck to make sure the chunk stuck statuses are accurate when the health of the file is then calculated.

The edge case that this is trying to address is when there are stuck chunks but the stuck health of a directory is 0.

Testing Added

Added unit test for MarkHealthyChunksAsUnstuck

Modules and Packages Impacted

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

Merge request reports