当前位置:网站首页>【线上问题处理】因代码造成mysql表死锁的问题,如何杀掉对应的进程
【线上问题处理】因代码造成mysql表死锁的问题,如何杀掉对应的进程
2022-07-06 07:11:00 【游戏编程】
同事 代码出了问题
Object savePoint = TransactionAspectSupport.currentTransactionStatus().createSavepoint();try{ //创建订单 agOrderRelationSwjList.forEach(e->{ //如果有记录 则删除原来的 //LambdaQueryWrapper<AgSwjMfiveOrder> queryWrapper = new LambdaQueryWrapper(); //queryWrapper.eq( AgSwjMfiveOrder::getMfiveOrder, order.getOrderCode() ).eq( AgSwjMfiveOrder::getSchemeId,e.getSchemeCode() ); //agSwjMfiveOrderService.remove( queryWrapper); operationFactory.getOperationService(SwjConstants.SWJ_L).createOrder(order.getOrderCode(),e.getSchemeCode()); });} catch (Exception e){ TransactionAspectSupport.currentTransactionStatus().rollbackToSavepoint(savePoint); throw new ServiceException("异常!");}
上面故障代码里面 执行了删除,为什么导致锁表呢?事务没有提交?事务是自动提交的呀。。。 回头查查代码问题
先处理MYSQL
select * from information_schema.innodb_trx
里面的trx 是没有办法 kill掉的
可以show engine innodb status
拿到数据 在里面搜对应的trx_id
会找到 可以在 show processlist 中的对应的线程ID,这样就可以 kill
本次故障的事务线程ID 就是194788882,可以看到 信息还是非常全面的
作者:方东信
游戏编程,一个游戏开发收藏夹~
如果图片长时间未显示,请使用Chrome内核浏览器。
边栏推荐
- Path analysis model
- NFT on fingertips | evaluate ambire on G2, and have the opportunity to obtain limited edition collections
- leetcode1020. Number of enclaves (medium)
- C - Inheritance - polymorphism - virtual function member (lower)
- 中青看点阅读新闻
- Visitor tweets about how you can layout the metauniverse
- Internal and external troubles of "boring ape" bayc
- JDBC学习笔记
- Misc of BUU (update from time to time)
- Configure raspberry pie access network
猜你喜欢
leetcode1020. Number of enclaves (medium)
微信公众号无限回调授权系统源码 全网首发
JDBC learning notes
3. Business and load balancing of high architecture
SSM learning
L'auteur est mort? Ai utilise l'art pour conquérir l'humanité
顶测分享:想转行,这些问题一定要考虑清楚!
Upgraded wechat tool applet source code for mobile phone detection - supports a variety of main traffic modes
Short video, more and more boring?
UWA pipeline version 2.2.1 update instructions
随机推荐
LeetCode Algorithm 2181. 合并零之间的节点
Hydra common commands
Blue Bridge Cup zero Foundation National Championship - day 20
The psychological process from autojs to ice fox intelligent assistance
Kubernetes cluster builds ZABBIX monitoring platform
[advanced software testing step 1] basic knowledge of automated testing
Babbitt | metauniverse daily must read: the group image of Chinese Internet enterprises pouring into metauniverse: "there are only various survival desires, and there is no ambition for forward-lookin
Prefix and array series
Win10 64 bit Mitsubishi PLC software appears oleaut32 DLL access denied
The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
[JDBC] quick start tutorial
“无聊猿” BAYC 的内忧与外患
将ue4程序嵌入qt界面显示
On the world of NDK (2)
Librosa audio processing tutorial
Applied stochastic process 01: basic concepts of stochastic process
Is software testing outsourcing going or not? Three years' real outsourcing experience tells you
Cif10 actual combat (resnet18)
Multithreading and concurrent programming (2)
UDP攻击是什么意思?UDP攻击防范措施