This commit is contained in:
Liang Ding
2023-01-08 23:23:17 +08:00
parent a0f92bd836
commit 7bd973deca

View File

@@ -1227,7 +1227,16 @@ func AutoFixIndex() {
}
}
var autoFixLock = sync.Mutex{}
func autoFixIndex() {
if util.IsMutexLocked(&autoFixLock) {
return
}
autoFixLock.Lock()
defer autoFixLock.Unlock()
rootUpdated := treenode.GetRootUpdated()
for rootID, updated := range rootUpdated {
root := sql.GetBlock(rootID)