🐛 索引嵌入块内容可能会导致内核崩溃 https://github.com/siyuan-note/siyuan/issues/7213

This commit is contained in:
Liang Ding 2023-01-31 17:28:47 +08:00
parent dbf6965c30
commit 204580bf36
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
4 changed files with 29 additions and 14 deletions

View file

@ -204,7 +204,7 @@ func autoIndexEmbedBlock(embedBlocks []*sql.Block) {
if "" == embedBlock.Content {
embedBlock.Content = "no query result"
}
sql.UpdateBlockContent(embedBlock)
sql.UpdateBlockContentQueue(embedBlock)
if 63 <= i { // 一次任务中最多处理 64 个嵌入块,防止卡顿
break
@ -225,7 +225,7 @@ func updateEmbedBlockContent(embedBlockID string, queryResultBlocks []*EmbedBloc
if "" == embedBlock.Content {
embedBlock.Content = "no query result"
}
sql.UpdateBlockContent(embedBlock)
sql.UpdateBlockContentQueue(embedBlock)
}
func init() {