|
@@ -1303,6 +1303,13 @@ func autoFixIndex() {
|
|
}
|
|
}
|
|
|
|
|
|
reindexTreeByPath(box.ID, p, i, size)
|
|
reindexTreeByPath(box.ID, p, i, size)
|
|
|
|
+ if util.IsExiting {
|
|
|
|
+ break
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if util.IsExiting {
|
|
|
|
+ break
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1347,6 +1354,10 @@ func autoFixIndex() {
|
|
logging.LogWarnf("exist more than one tree [%s], reindex it", rootID)
|
|
logging.LogWarnf("exist more than one tree [%s], reindex it", rootID)
|
|
sql.RemoveTreeQueue(root.Box, rootID)
|
|
sql.RemoveTreeQueue(root.Box, rootID)
|
|
reindexTree(rootID, i, size)
|
|
reindexTree(rootID, i, size)
|
|
|
|
+
|
|
|
|
+ if util.IsExiting {
|
|
|
|
+ break
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
util.PushStatusBar(Conf.Language(185))
|
|
util.PushStatusBar(Conf.Language(185))
|
|
@@ -1358,6 +1369,10 @@ func reindexTreeByUpdated(rootUpdatedMap, dbRootUpdatedMap map[string]string, bl
|
|
for rootID, updated := range rootUpdatedMap {
|
|
for rootID, updated := range rootUpdatedMap {
|
|
i++
|
|
i++
|
|
|
|
|
|
|
|
+ if util.IsExiting {
|
|
|
|
+ break
|
|
|
|
+ }
|
|
|
|
+
|
|
rootUpdated := dbRootUpdatedMap[rootID]
|
|
rootUpdated := dbRootUpdatedMap[rootID]
|
|
if "" == rootUpdated {
|
|
if "" == rootUpdated {
|
|
logging.LogWarnf("not found tree [%s] in database, reindex it", rootID)
|
|
logging.LogWarnf("not found tree [%s] in database, reindex it", rootID)
|
|
@@ -1378,6 +1393,10 @@ func reindexTreeByUpdated(rootUpdatedMap, dbRootUpdatedMap map[string]string, bl
|
|
reindexTree(rootID, i, size)
|
|
reindexTree(rootID, i, size)
|
|
continue
|
|
continue
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ if util.IsExiting {
|
|
|
|
+ break
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
for rootID, _ := range dbRootUpdatedMap {
|
|
for rootID, _ := range dbRootUpdatedMap {
|
|
@@ -1385,6 +1404,10 @@ func reindexTreeByUpdated(rootUpdatedMap, dbRootUpdatedMap map[string]string, bl
|
|
logging.LogWarnf("tree [%s] is not in block tree, remove it from [%s]", rootID, blocksTable)
|
|
logging.LogWarnf("tree [%s] is not in block tree, remove it from [%s]", rootID, blocksTable)
|
|
sql.DeleteTree(blocksTable, rootID)
|
|
sql.DeleteTree(blocksTable, rootID)
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ if util.IsExiting {
|
|
|
|
+ break
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|