report error if the ghost objects file is busted

This commit is contained in:
Neil Macneale IV
2024-02-14 09:49:55 -08:00
parent 1e03716a6a
commit ddf74aae9f
3 changed files with 44 additions and 30 deletions
+5 -4
View File
@@ -163,15 +163,16 @@ func (fact FileFactory) CreateDB(ctx context.Context, nbf *types.NomsBinFormat,
}
oldGenSt, err := nbs.NewLocalStore(ctx, newGenSt.Version(), oldgenPath, defaultMemTableSize, q)
if err != nil {
return nil, nil, nil, err
}
// NM4 - error handling. Currently, no-op (nil) if there is no hardcoded file.
lostGen := nbs.NewGhostBlockStore(path)
ghostGen, err := nbs.NewGhostBlockStore(path)
if err != nil {
return nil, nil, nil, err
}
st := nbs.NewGenerationalCS(oldGenSt, newGenSt, lostGen)
st := nbs.NewGenerationalCS(oldGenSt, newGenSt, ghostGen)
// metrics?
vrw := types.NewValueStore(st)