Skip to content

Commit

Permalink
dump: skip trash in fast mode for sql/tkv (#4563)
Browse files Browse the repository at this point in the history
  • Loading branch information
davies authored Mar 22, 2024
1 parent 5292c28 commit 8cab7a1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion pkg/meta/sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -3885,7 +3885,9 @@ func (m *dbMeta) DumpMeta(w io.Writer, root Ino, keepSecret, fast, skipTrash boo
}
bar.Done()
tree = m.dumpEntryFast(root, TypeDirectory)
trash = m.dumpEntryFast(TrashInode, TypeDirectory)
if !skipTrash {
trash = m.dumpEntryFast(TrashInode, TypeDirectory)
}
} else {
tree = &DumpedEntry{
Name: "FSTree",
Expand Down
4 changes: 3 additions & 1 deletion pkg/meta/tkv.go
Original file line number Diff line number Diff line change
Expand Up @@ -3321,7 +3321,9 @@ func (m *kvMeta) DumpMeta(w io.Writer, root Ino, keepSecret, fast, skipTrash boo
}
bar.Done()
tree = m.snap[root]
trash = m.snap[TrashInode]
if !skipTrash {
trash = m.snap[TrashInode]
}
} else {
tree = &DumpedEntry{
Attr: &DumpedAttr{
Expand Down

0 comments on commit 8cab7a1

Please sign in to comment.