2022-09-07 09:11:06 +00:00
|
|
|
package tree
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
2023-03-07 13:38:26 +00:00
|
|
|
cid "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/container/id"
|
2022-09-07 09:11:06 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// 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)
|
|
|
|
}
|