pilorama: Fix duplicate directory handling #1234
No reviewers
Labels
No labels
P0
P1
P2
P3
badger
frostfs-adm
frostfs-cli
frostfs-ir
frostfs-lens
frostfs-node
good first issue
triage
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
6 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#1234
Loading…
Reference in a new issue
No description provided.
Delete branch "fyrchik/frostfs-node:fix-duplicate-directory"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Consider
a/b/c
anda/b/x
being created concurrently.Internal nodes
a/b
anda/b
will be different even after synchronization, as unique ID is generated for each of them.Currently, GetByPath() takes only one path, because it assumes no other paths exist.
This commit fixes the issue by using sets of nodes instead of a single node during traversal.
ac446febbe
toc8272bfd9b
c8272bfd9b
to11129661ac
@ -1412,6 +1414,36 @@ func (t *boltForest) TreeListTrees(ctx context.Context, prm TreeListTreesPrm) (*
return &res, nil
}
func (t *boltForest) getPathPrefixNew(bTree *bbolt.Bucket, attr string, path []string) (int, []Node, error) {
After
...New
we'll need the...Newest
? :)Let's rename it to
getPathPrefixDepthTraverse
?Right, was from testing, fixed
11129661ac
to00be714af6
LGTM