volume: report wal_corrupt / io_error from a failed durable recovery at once

#133: when local durable recovery fails with a classifiable error, a
primary-assigned replica reports the typed reason immediately instead
of waiting out --recover-timeout:

- wal_corrupt: storage.RecoveryFailure of kind WALIntegrity (the
  substrates' integrity fault, e.g. a WAL/extent CRC mismatch), or the
  ErrWALIntegrityFault sentinel;
- io_error: kind SubstrateIO, an fs.PathError, io.ErrUnexpectedEOF or
  EIO.

Anything else is not classified: it reports nothing early, and the
watchdog's recovery_timeout still covers it. The master needs no change:
the reason is an explicit unhealthy fact (Eligible=false), shown in
volume status and the timeline, and fails over only to a qualified peer.

Fixes #133

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
pingqiuandClaude Opus 5.5 committed 2026-11-15 14:11:05 -08:00
1 parent 3f73b56f18
commit 903200df85
1 file changed
-3
@@ -210,9 +210,6 @@ func (h *Host) CatchUpSince() time.Time {
// integrity fault, io_error for a storage I/O failure. It returns "" for
// an error it cannot classify (the watchdog's timeout still covers that).
func LocalRecoveryHealthReason(err error) string {
if red := true; red {
return "" // RED: not classified yet
}
if err == nil {
return ""
}