forked from TrueCloudLab/frostfs-node
Remove outdated code of metabase and localstore
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
869d9e571c
commit
a875d80491
41 changed files with 1725 additions and 3123 deletions
19
pkg/local_object_storage/metabase/inhume.go
Normal file
19
pkg/local_object_storage/metabase/inhume.go
Normal file
|
@ -0,0 +1,19 @@
|
|||
package meta
|
||||
|
||||
import (
|
||||
objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object"
|
||||
"go.etcd.io/bbolt"
|
||||
)
|
||||
|
||||
// Inhume marks objects as removed but not removes it from metabase.
|
||||
func (db *DB) Inhume(target, tombstone *objectSDK.Address) error {
|
||||
return db.boltDB.Update(func(tx *bbolt.Tx) error {
|
||||
graveyard, err := tx.CreateBucketIfNotExists(graveyardBucketName)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// consider checking if target is already in graveyard?
|
||||
return graveyard.Put(addressKey(target), addressKey(tombstone))
|
||||
})
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue