当前位置:网站首页>【线上问题处理】因代码造成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内核浏览器。
边栏推荐
- Due to high network costs, arbitrum Odyssey activities are suspended, and nitro release is imminent
- 变量的命名规则十二条
- C - Inheritance - polymorphism - virtual function member (lower)
- PCL实现选框裁剪点云
- Visitor tweets about how you can layout the metauniverse
- 18.多级页表与快表
- What does UDP attack mean? UDP attack prevention measures
- Résumé de la structure du modèle synthétisable
- How are the open source Netease cloud music API projects implemented?
- 网络安全基础介绍
猜你喜欢

Misc of BUU (update from time to time)

Raspberry pie serial port login and SSH login methods

Setting and using richview trvstyle template style
![[daily question] 729 My schedule I](/img/6b/a9fef338ac09caafe628023f066e1f.png)
[daily question] 729 My schedule I

SSM学习

SEO学习的最好方式:搜索引擎

MVVM of WPF

漏了监控:Zabbix对Eureka instance状态监控

Internal and external troubles of "boring ape" bayc

Cookie Technology & session Technology & ServletContext object
随机推荐
JDBC学习笔记
数据仓库建设思维导图
Thought map of data warehouse construction
Wechat official account infinite callback authorization system source code, launched in the whole network
Uncaught TypeError: Cannot red propertites of undefined(reading ‘beforeEach‘)解决方案
微信脑力比拼答题小程序_支持流量主带最新题库文件
What does UDP attack mean? UDP attack prevention measures
Cookie技术&Session技术&ServletContext对象
漏了监控:Zabbix对Eureka instance状态监控
[hot100] 739. Température quotidienne
19.段页结合的实际内存管理
The difference between get and post request types
Three methods of adding color to latex text
The differences and advantages and disadvantages between cookies, seeion and token
Chrome view page FPS
JDBC learning notes
PCL realizes frame selection and clipping point cloud
《从0到1:CTFer成长之路》书籍配套题目(周更)
SSM learning
Kubernetes cluster builds ZABBIX monitoring platform