当前位置:网站首页>【线上问题处理】因代码造成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内核浏览器。
边栏推荐
- Structure summary of SystemVerilog integrable model
- Supporting title of the book from 0 to 1: ctfer's growth road (Zhou Geng)
- 【JDBC】快速入门教程
- 【Hot100】739. 每日温度
- Hydra common commands
- JDBC learning notes
- Oracle database 11gr2 uses TDE transparent data encryption to report an error ora28353. If you run to close the wallet, you will report an error ora28365. If you run to open the wallet, you will repor
- GET 和 POST 请求类型的区别
- 网络安全基础介绍
- MVVM of WPF
猜你喜欢
Crawling exercise: Notice of crawling Henan Agricultural University
leetcode35. 搜索插入位置(简单,找插入位置,不同写法)
Wechat official account infinite callback authorization system source code, launched in the whole network
(4) Web security | penetration testing | network security web site source code and related analysis
kubernetes集群搭建Zabbix监控平台
Entity Developer数据库应用程序的开发
[advanced software testing step 1] basic knowledge of automated testing
树莓派串口登录与SSH登录方法
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
3. Business and load balancing of high architecture
随机推荐
接口自动化测试框架:Pytest+Allure+Excel
作者已死?AI正用艺术征服人类
#systemverilog# 可綜合模型的結構總結
LeetCode 78:子集
Supporting title of the book from 0 to 1: ctfer's growth road (Zhou Geng)
Librosa audio processing tutorial
Introduction to ros2 installation and basic knowledge
Entity Developer数据库应用程序的开发
Compile, connect -- notes-2
《从0到1:CTFer成长之路》书籍配套题目(周更)
TS Basics
SEO学习的最好方式:搜索引擎
RichView TRVStyle 模板样式的设置与使用
MVVM of WPF
The author is dead? AI is conquering mankind with art
Thought map of data warehouse construction
How to find a medical software testing institution? First flight software evaluation is an expert
3. Business and load balancing of high architecture
GET 和 POST 请求类型的区别
简单描述 MySQL 中,索引,主键,唯一索引,联合索引 的区别,对数据库的性能有什么影响(从读写两方面)