当前位置:网站首页>[online problem processing] how to kill the corresponding process when the MySQL table deadlock is caused by the code
[online problem processing] how to kill the corresponding process when the MySQL table deadlock is caused by the code
2022-07-06 07:14:00 【Game programming】
colleagues There's something wrong with the code
Object savePoint = TransactionAspectSupport.currentTransactionStatus().createSavepoint();try{ // Create order agOrderRelationSwjList.forEach(e->{ // If there's a record Delete the original //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(" abnormal !");}
In the above fault code Deletion performed , Why do you lock the watch ? The transaction was not committed ? Transactions are automatically committed ... Go back and check the code
First processing MYSQL
select * from information_schema.innodb_trx
Inside trx There is no way kill Dropped
Sure show engine innodb status
Get the data Search the corresponding trx_id
Will find Can be in show processlist The corresponding thread in ID, In this way, we can kill
The transaction thread of this failure ID Namely 194788882, You can see The information is still very comprehensive

author : Fang Dongxin
Game programming , A game development favorite ~
If the picture is not displayed for a long time , Please use Chrome Kernel browser .
边栏推荐
- Three methods of adding color to latex text
- A brief introduction of reverseme in misc in the world of attack and defense
- Leetcode35. search the insertion position (simple, find the insertion position, different writing methods)
- LeetCode Algorithm 2181. 合并零之间的节点
- 【服务器数据恢复】IBM服务器raid5两块硬盘离线数据恢复案例
- Markdown 中设置图片图注
- “无聊猿” BAYC 的内忧与外患
- Raspberry pie serial port login and SSH login methods
- Seriously recommend several machine learning official account
- 数字IC设计笔试题汇总(一)
猜你喜欢
C - Inheritance - polymorphism - virtual function member (lower)
变量的命名规则十二条
Raspberry pie serial port login and SSH login methods
First knowledge of OpenGL es learning (1)
杰理之BLE【篇】
SEO学习的最好方式:搜索引擎
【线上问题处理】因代码造成mysql表死锁的问题,如何杀掉对应的进程
Lesson 12 study notes 2022.02.11
配置树莓派接入网络
Introduction to ros2 installation and basic knowledge
随机推荐
Three methods of adding color to latex text
RichView TRVStyle 模板样式的设置与使用
CDN acceleration and cracking anti-theft chain function
Arduino tutorial - Simon games
Setting and using richview trvstyle template style
Introduction to the basics of network security
【JDBC】快速入门教程
变量的命名规则十二条
Leetcode35. search the insertion position (simple, find the insertion position, different writing methods)
数字IC设计笔试题汇总(一)
树莓派串口登录与SSH登录方法
Detailed explanation | detailed explanation of internal mechanism of industrial robot
Bloom taxonomy
Top test sharing: if you want to change careers, you must consider these issues clearly!
Thought map of data warehouse construction
Uncaught typeerror: cannot red properties of undefined (reading 'beforeeach') solution
LeetCode Algorithm 2181. 合并零之间的节点
1091: two or three things in childhood (multi instance test)
leetcode35. 搜索插入位置(简单,找插入位置,不同写法)
Wechat official account infinite callback authorization system source code, launched in the whole network