🎨 清理块树中重复冗余的数据

This commit is contained in:
Liang Ding 2023-02-01 15:22:09 +08:00
parent de79543300
commit c0240f20d6
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
4 changed files with 127 additions and 92 deletions

View file

@ -106,12 +106,10 @@ func autoFixIndex() {
size := len(paths)
// 清理块树中重复冗余的数据
redundantPaths := treenode.GetRedundantPaths(box.ID, paths)
for _, p := range redundantPaths {
treenode.RemoveBlockTreesByPath(box.ID, p)
}
// 清理块树中的冗余数据
treenode.ClearRedundantBlockTrees(box.ID, paths)
// 重新索引缺失的块树
missingPaths := treenode.GetNotExistPaths(box.ID, paths)
for i, p := range missingPaths {
id := path.Base(p)