This commit is contained in:
Liang Ding 2023-01-08 23:23:17 +08:00
parent a0f92bd836
commit 7bd973deca
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

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)