![]() ![]() RECORD LOCKS space id 859892 page no 1508578 n bits 904 index `lastSeen` of table `indicators`.`fileso` trx id 2264758569 lock_mode X locks gap before rec insert intention waiting *** (2) WAITING FOR THIS LOCK TO BE GRANTED: ![]() RECORD LOCKS space id 859892 page no 1508578 n bits 888 index `lastSeen` of table `indicators`.`fileso` trx id 2264758569 lock_mode X locks rec but not gap INSERT IGNORE INTO indicators.fileso (hostId, sha256, p_runningUser, NTFSOwner, fullPath, MySQL thread id 1310, OS thread handle 0x2580, query id 260771450 localhost 127.0.0.1 root update ![]() TRANSACTION 2264758569, ACTIVE 1 sec updating or deletingĤ2 lock struct(s), heap size 6544, 72 row lock(s), undo log entries 39 RECORD LOCKS space id 859892 page no 1508578 n bits 888 index `lastSeen` of table `indicators`.`fileso` trx id 2264758566 lock mode S waiting *** (1) WAITING FOR THIS LOCK TO BE GRANTED: MySQL thread id 1319, OS thread handle 0x1c64, query id 260771445 localhost 127.0.0.1 root Sending data TRANSACTION 2264758566, ACTIVE 1 sec fetching rows Spin rounds per wait: 1.56 mutex, 5.61 RW-shared, 13.37 RW-excl OS WAIT ARRAY INFO: signal count 182953746 OS WAIT ARRAY INFO: reservation count 21290331 Srv_master_thread log flush and writes: 2188289 Srv_master_thread loops: 2170553 srv_active, 0 srv_shutdown, 17765 srv_idle Per second averages calculated from the last 35 seconds JOIN indicators.fileso fo ON foi.uniqueness = fo.uniqueness P_ParentPath ,ar_regPath, ar_regKey, ar_regValue, hostName, extension, p_parentUser, Transaction A (2 in status): INSERT IGNORE INTO indicators.fileso (hostId, sha256, p_runningUser, NTFSOwner, fullPath,įileName, s_serviceName, d_driverName, p_commandLineParams, So with that logic my conclusion is that an insert ignore (without any select/join or use of another resource) will never create a deadlock.(since it uses only 1 resource), in the worse case a lock wait will be created.īut when I look in the show engine innodb status I can see a deadlock for that kind of transaction. MySQL locks range-type if where condition in FOR UPDATE is not UNIQUE keys.As far as I know and read so many time dead locks only happens when one transaction is locking resource A and waiting for B and another transaction does the opposite. One of the reasons such error could occur is, usage of FOR UPDATE in MySql select query. SequelizeDatabaseError: Deadlock found when trying to get lock try restarting transaction\n at Query.formatError (/usr/local/xxx/node_modules/sequelize/lib/dialects/mysql/query.js:247:16)\n at Query.handler (/usr/local/xxx/node_modules/sequelize/lib/dialects/mysql/query.js:68:23)\n at Query.execute (/usr/local/xxx/node_modules/mysql2/lib/commands/command.js:30:14)\n at Connection.handlePacket (/usr/local/xxx/node_modules/mysql2/lib/connection.js:408:32)\n at (/usr/local/xxx/node_modules/mysql2/lib/connection.js:70:12)\n at PacketParser.executeStart (/usr/local/xxx/node_modules/mysql2/lib/packet_parser.js:75:16)\n at .data (/usr/local/xxx/node_modules/mysql2/lib/connection.js:328:25)\n at TLSSocket.emit (events.js:198:13)\n at addChunk (_stream_readable.js:288:12)\n at readableAddChunk (_stream_readable.js:269:11)\n at (_stream_readable.js:224:10)\n at TLSWrap.onStreamRead (internal/stream_base_commons.js:94:17) Sequelize with MySql can throw Deadlock found when trying to get lock. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |