[Programming Task] Only Bubble Dirs if there was a successful repair
PROGRAMMING TASK
Description of Task
Only bubble directories if there was a successful repair, or change.
Reason or Need for Change
Bubble is resource intensive. If we can intelligently determine what are the absolutely required bubbles that would help reduce some unneeded comupation.
Design / Proposal
The following discussion from !3807 (merged) should be addressed:
-
@ChrisSchinnerl started a discussion: (+2 comments) stuckChunkSuccess
signals that a chunk was successfully repaired but not which dir it was in. Should we really bubble all thedirSiaPaths
instead of trying to just bubble the dirs with successful repairs?
Currently we are calling bubble on all the directories we pull stuck chunks from at the end of the stuck loop. This is not ideal for a number of reasons that can result in the bubble not being needed. Ideally we call bubble when we successfully repair a stuck chunk in managedCleanUpUploadChunk
.
Originally that is where we called bubble for all repairs, however this lead to excessive disk I/O and was removed. Once bubble has been updated and optimized to reduce disk I/O we can move those bubble calls back to managedCleanUpUploadChunk
so that we are only calling bubble when absolutely necessary.