Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR addresses a few UX pain points described in https://forum.subspace.network/t/farm-stops-if-drive-drops-out/3051?u=nazar-pc and https://forum.subspace.network/t/can-farmer-still-continue-if-there-is-a-broken-plot-disk/2906?u=nazar-pc before that (not counting many other cases).
First of all, in case we had a single broken/missing (for example after scrub) element in piece cache, piece cache was stopping reading further pieces, which may still be there, forcing larger than necessary piece cache sync on restart. We change that to tolerate a series of a few broken/missing pieces instead.
Second, completely missing/broken disk can cause farmer to print an infinite list of error messages, this change prevents it by having a threshold after which non-fatal errors become fatal.
Third, after crash of one farm farmer will no longer exit by default if there are other farms working successfully, this allows user to continue plotting/farming until they have a chance to check what is going on with farmer. Previous default behavior can be restored with
--exit-on-farm-error
.Code contributor checklist: