Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Vanessa 2022-08-20 21:38:24 +08:00
commit f402a4e274

View file

@ -137,9 +137,7 @@ func (box *Box) Index(fullRebuildIndex bool) (treeCount int, treeSize int64) {
sql.PutBoxHash(tx, box.ID, boxHash)
util.SetBootDetails("Cleaning obsolete indexes...")
util.PushEndlessProgress(Conf.Language(108))
if err = sql.DeleteByBoxTx(tx, box.ID); nil != err {
return
}
sql.DeleteByBoxTx(tx, box.ID)
if err = sql.CommitTx(tx); nil != err {
return
}
@ -167,6 +165,7 @@ func (box *Box) Index(fullRebuildIndex bool) (treeCount int, treeSize int64) {
continue
}
if err = sql.InsertBlocksSpans(tx, tree); nil != err {
sql.RollbackTx(tx)
continue
}
if err = sql.CommitTx(tx); nil != err {