frostfs-node/pkg/services/tree/drop.go
Evgenii Stratonikov 9da5d784cb [#1630] neofs-node: Remove trees on container removal event
Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
2022-09-12 09:54:15 +03:00

14 lines
462 B
Go

package tree
import (
"context"
cid "github.com/nspcc-dev/neofs-sdk-go/container/id"
)
// DropTree drops a tree from the database. If treeID is empty, all the trees are dropped.
func (s *Service) DropTree(_ context.Context, cid cid.ID, treeID string) error {
// The only current use-case is a container removal, where all trees should be removed.
// Thus there is no need to replicate the operation on other node.
return s.forest.TreeDrop(cid, treeID)
}