当前位置:网站首页>[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 .
边栏推荐
- BIO模型实现多人聊天
- 杰理之AD 系列 MIDI 功能说明【篇】
- leetcode704. 二分查找(查找某个元素,简单,不同写法)
- 杰理之需要修改 gatt 的 profile 定义【篇】
- C - Inheritance - polymorphism - virtual function member (lower)
- #systemverilog# 可综合模型的结构总结
- Introduction to ros2 installation and basic knowledge
- Supporting title of the book from 0 to 1: ctfer's growth road (Zhou Geng)
- PCL realizes frame selection and clipping point cloud
- navicat如何导入MySQL脚本
猜你喜欢
Kubernetes cluster builds ZABBIX monitoring platform
leetcode59. 螺旋矩阵 II(中等)
Depth residual network
Leetcode35. search the insertion position (simple, find the insertion position, different writing methods)
L'auteur est mort? Ai utilise l'art pour conquérir l'humanité
Solution to the problem of breakthrough in OWASP juice shop shooting range
数据仓库建设思维导图
Oracle数据库11gr2使用tde透明数据加密报错ora28353,如果运行关闭wallet会报错ora28365,运行打开wallet就报错ora28353无法打开wallet
Misc of BUU (update from time to time)
leetcode1020. 飞地的数量(中等)
随机推荐
Internal and external troubles of "boring ape" bayc
【Hot100】739. Daily temperature
Briefly describe the differences between indexes, primary keys, unique indexes, and joint indexes in mysql, and how they affect the performance of the database (in terms of reading and writing)
Prefix and array series
Hydra common commands
Top test sharing: if you want to change careers, you must consider these issues clearly!
The difference between get and post request types
leetcode841. 钥匙和房间(中等)
#systemverilog# 可綜合模型的結構總結
Establishment and operation of cloud platform open source project environment
supervisor 使用文档
TS基础篇
1091: two or three things in childhood (multi instance test)
Introduction to the basics of network security
C语言 简单易懂的高精度加法
微信公众号无限回调授权系统源码 全网首发
The author is dead? AI is conquering mankind with art
Misc of BUU (update from time to time)
[server data recovery] case of offline data recovery of two hard disks of IBM server RAID5
【线上问题处理】因代码造成mysql表死锁的问题,如何杀掉对应的进程