\345\205\263\344\272\216\351\224\201\350\266\205\346\227\266\351\227\256\351\242\230\346\216\222\346\237\245.md
... ...
@@ -11,4 +11,17 @@ UPDATE `rbac_user` t SET t.`login_count` = 0, `pwd_expire_day` = 90, `last_login
11 11
2024-10-25 10:39:18.685 [pool-8-thread-1] ERROR c.s.snest.engine.db.relationdb.RelationDBAccessor -数据源:main,执行SQL失败:Lock wait timeout exceeded; try restarting transaction
12 12
13 13
14
-```
... ...
\ No newline at end of file
0
+```
1
+
2
+
3
+长事物导致更改rbac_user表的数据锁超时,事物没有结束所以拿不到锁。
4
+
5
+经过排查到一段业务比较特殊,是批量插入,并且有可能导致长事物,并且会行锁rbac_user表
6
+
7
+```
8
+REPLACE INTO test_user (id, name, age, `password`, create_user, create_date, update_user, update_date) SELECT d.id, d.name, d.age, d.tenant_id, u1.name , d.create_date, u2.name, d.update_date FROM edo_user d, rbac_user u1, rbac_user u2 WHERE u1.id = d.create_user AND u2.id = d.update_user
9
+待投批次数据统计定时任务出现异常:
10
+
11
+
12
+```
13
+