This commit is contained in:
Liang Ding 2023-01-09 17:38:41 +08:00
parent 9474f558ad
commit e8012158ea
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
2 changed files with 4 additions and 3 deletions

View file

@ -1231,6 +1231,8 @@ func AutoFixIndex() {
var autoFixLock = sync.Mutex{}
func autoFixIndex() {
defer logging.Recover()
if util.IsMutexLocked(&autoFixLock) || isFullReindexing {
return
}

View file

@ -117,15 +117,14 @@ func CeilBlockCount(count int) int {
}
func GetNotExistPaths(boxID string, paths []string) (ret []string) {
blockTreesLock.Lock()
defer blockTreesLock.Unlock()
tmp := blockTrees
pathsMap := map[string]bool{}
for _, path := range paths {
pathsMap[path] = true
}
for _, blockTree := range blockTrees {
for _, blockTree := range tmp {
if blockTree.BoxID != boxID {
continue
}