Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: 数据库事务队列执行报错回滚释放连接

Liang Ding209a853040bf
diff --git a/kernel/sql/queue.go b/kernel/sql/queue.go
index 8ab363c019..25447d1978 100644
--- a/kernel/sql/queue.go
+++ b/kernel/sql/queue.go
@@ -118,6 +118,7 @@ func FlushQueue() {
context["current"] = i
context["total"] = total
if err = execOp(op, tx, context); nil != err {
+ tx.Rollback()
logging.LogErrorf("queue operation failed: %s", err)
return
}