Browse Source

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

Liang Ding 2 năm trước cách đây
mục cha
commit
209a853040
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  1. 1 0
      kernel/sql/queue.go

+ 1 - 0
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
 		}