1
0
mirror of https://github.com/taigrr/bitcask synced 2025-01-18 04:03:17 -08:00

Improve error reporting on recovery errors

This commit is contained in:
James Mills 2021-07-14 22:59:51 +10:00
parent 947d15fed8
commit 52df2fad55
No known key found for this signature in database
GPG Key ID: AC4C014F1440EBD6

View File

@ -27,7 +27,7 @@ func CheckAndRecover(path string, cfg *config.Config) error {
f := dfs[len(dfs)-1] f := dfs[len(dfs)-1]
recovered, err := recoverDatafile(f, cfg) recovered, err := recoverDatafile(f, cfg)
if err != nil { if err != nil {
return fmt.Errorf("recovering data file") return fmt.Errorf("error recovering data file: %s", err)
} }
if recovered { if recovered {
if err := os.Remove(filepath.Join(path, "index")); err != nil { if err := os.Remove(filepath.Join(path, "index")); err != nil {