Skip to content

tweak repair process to better handle edge cases

David Vorick requested to merge repair-tweak into master

A particular edge case came up related to processing chunks. It is occasionally the case that a chunk can repair itself (because a host comes back online) between checks on the chunk or calls to Bubble.

When this happens, the renter can mistakenly believe that it's incorrectly processed a directory because the directory which was supposed to be low health had no bad chunks in it, causing the repair process to freeze for a while.

This eliminates that edge case by removing the determination that a zero size heap must happen because of an error.

An additional change was made to the 'managedRepairLoop' which was set to work through all of the chunks in the heap if the heap started out being small. This isn't really the condition we care about, we care about finishing off the heap if we know that there are no more chunks which need to be added to the heap. So instead of using the heap's current size as the determining factor, we peek at the directory heap's health and use that instead to decide whether or not to keep processing chunks.

Merge request reports