Shared bbolt-failure classifier in tollwallet — one parser for degraded-mode reasons and wallet-check verdicts (follow-up from #741/#743 reviews)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 18/100
Direzione di ricerca
Start by reading IsStorageMmapUnsupported in tollwallet (mmap_compat.go) and mapWorkerOutcome in src/cmd/tollgate-cli/wallet_check.go, which are the two parsers to merge. Design the shared ClassifyStorageFailure and its class enum in tollwallet/storage_failure.go, keeping worker-process isolation for any bbolt open used by checks. Done when both consumers become thin adapters over the shared classifier and the existing classifier table and seeded-corruption tests pass against it.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
#741's review (follow-up 2) + #743's review (fragility note) converge on the same structural point: two ad-hoc parsers of bbolt failure modes will drift. Today the corruption-vs-unsupported distinction exists in two places:
- #741:
tollwallet.IsStorageMmapUnsupported— errno-chain/errno-text classification for storage unsupported (degraded-mode entry, honest error strings); - #743:
src/cmd/tollgate-cli/wallet_check.go— open-error vs check-findings vs worker-death verdicts for corruption (the crash-isolatedwallet check).
A shared classifier in tollwallet should serve both: one place that turns a bbolt-layer error (or worker outcome) into the named failure classes — storage-unsupported (#583 jffs2/mmap), corrupt-or-unreadable (open/check/panic/SIGBUS shapes), locked (#742's ErrWalletLocked), absent, other — with each consumer mapping classes to its surface (degraded-mode reason strings vs CLI verdicts/exit codes).
Constraints to carry (from the reviews)
- The corruption classes must keep worker-process isolation wherever bbolt is actually opened for checking (#743's fragility note: running bbolt Open in-process for a check command reintroduces the panic-on-corruption surface the worker exists to contain).
errors.Isfirst, errno-text fallback stays necessary while gonuts wraps with%v(#743's audit note).- Consumers: degraded-mode entry +
walletUnavailableReason()(#741),wallet checkverdict mapping (mapWorkerOutcome) + any future status surface (see the sibling follow-up #824).
Proposed
tollwallet/storage_failure.go (or extend mmap_compat.go): exported ClassifyStorageFailure(err error) StorageFailureClass + the class enum; #741's boolean and #743's verdict mapping become thin adapters over it. Tests: the existing classifier table (#741) + the seeded-corruption matrix (#743) both re-pointed at the shared classification.
References
- Review asks: #741 review (follow-up 2), #743 review (fragility note)
- Lingua principale
- Go
- Stelle
- 12
- Fork
- 14
- Merge medio
- 3g 20h
- PR unite (30g)
- 261
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di OpenTollGate/tollgate-module-basic-go
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
OpenTollGate/tollgate-module-basic-go#1159 ·
I maintainer di solito rispondono entro 1 giorno
-
Degraded-mode hygiene follow-ups: dead walletNotInitializedError() + main.go's startup log still over-promises mint recoveryForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
OpenTollGate/tollgate-module-basic-go#1135 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
setup_uhttpd_portal hardcodes the GUEST portal docroot to the TollGate path — the brand token cannot select a re-brand guest portalForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
OpenTollGate/tollgate-module-basic-go#1122 ·
I maintainer di solito rispondono entro 1 giorno
-
changelog: dependency-security sweep missing from [Unreleased] [Amperstrand fork #105 review debt]Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
OpenTollGate/tollgate-module-basic-go#1055 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
OpenTollGate/tollgate-module-basic-go#1027 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di OpenTollGate/tollgate-module-basic-go
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
apache/arrow-swift#209 ·
I maintainer di solito rispondono entro 1 giorno
-
orchestrator: NFS-cache "cache path is not set" WARN logged on every build/launch instead of onceForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 65/100
influxdata/telegraf#20031 ·
I maintainer di solito rispondono entro 1 giorno
-
pkg/registry/file no longer builds for GOOS=windows: unguarded syscall.Stat_t in qualified_resource_migration.goForse già presa @AnshulPatil2005 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
OneBusAway/maglev#1914 ·
I maintainer di solito rispondono entro 2 giorni