Skip to content

Commit

Permalink
node/meta: do not panic if garbage/graveyard bucket is missing
Browse files Browse the repository at this point in the history
They should exist normally, but we also use this code in neofs-lens that can
work with any metabase in any state. Technically, it is also correct: missing
graveyard iteration may be considered no-op.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
  • Loading branch information
carpawell committed Oct 28, 2024
1 parent 02adb6d commit 3171076
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/local_object_storage/metabase/graveyard.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,10 @@ func (db *DB) iterateDeletedObj(tx *bbolt.Tx, h kvHandler, offset *oid.Address)
panic(fmt.Sprintf("metabase: unknown iteration object hadler: %T", t))
}

if bkt == nil {
return nil
}

c := bkt.Cursor()
var k, v []byte

Expand Down

0 comments on commit 3171076

Please sign in to comment.