@Transactionalpublic class test(){// 往A表中插入数据public void A(){}// 往B表中插入数据public void B(){}
@Servicepublic class TestAnother{@Autowiredprivate Test test;public void C(){try{test.A();}catch(Exception e){e.printStackTrace();}try{test.B();}catch(Exception e){e.printStackTrace();}}
=====================================2019-09-07 06:28:38 7fe01c931700 INNODB MONITOR OUTPUT=====================================Per second averages calculated from the last 24 seconds-----------------BACKGROUND THREAD-----------------srv_master_thread loops: 8912 srv_active, 0 srv_shutdown, 516445 srv_idlesrv_master_thread log flush and writes: 524528----------SEMAPHORES----------OS WAIT ARRAY INFO: reservation count 24855OS WAIT ARRAY INFO: signal count 25085Mutex spin waits 14574, rounds 408115, OS waits 13345RW-shared spins 10346, rounds 338033, OS waits 11257RW-excl spins 216, rounds 7866, OS waits 240Spin rounds per wait: 28.00 mutex, 32.67 RW-shared, 36.42 RW-excl------------TRANSACTIONS------------Trx id counter 690061Purge done for trx's n:o < 690050 undo n:o < 0 state: running but idleHistory list length 1343LIST OF TRANSACTIONS FOR EACH SESSION:---TRANSACTION 0, not startedMySQL thread id 18225, OS thread handle 0x7fe01c931700, query id 686481 172.17.0.1 root initshow engine innodb status---TRANSACTION 690050, not startedMySQL thread id 18223, OS thread handle 0x7fdf6331b700, query id 686305 172.17.0.1 root---TRANSACTION 690060, not startedMySQL thread id 18203, OS thread handle 0x7fe01cabd700, query id 686456 172.17.0.1 root---TRANSACTION 690058, ACTIVE 32 sec insertingmysql tables in use 1, locked 1LOCK WAIT 5 lock struct(s), heap size 1184, 3 row lock(s), undo log entries 2MySQL thread id 18202, OS thread handle 0x7fe01c1b7700, query id 686341 172.17.0.1 root updateINSERT INTO spot_account_flows (flowType, refType, refId, fromUserId, fromAccountId, toUserId, toAccountId, currency, amount, description, createdAt) VALUES ('TRADE_CLEAR', 'CLEARING', 0, 100000, 102950, 100000, 108015, 'BTC', 1, '', 1567837686558)------- TRX HAS BEEN WAITING 32 SEC FOR THIS LOCK TO BE GRANTED:RECORD LOCKS space id 643 page no 97 n bits 144 index `PRIMARY` of table `ex`.`spot_account_flows` trx id 690058 lock_mode X insert intention waitingRecord lock, heap no 1 PHYSICAL RECORD: n_fields 1; compact format; info bits 00: len 8; hex 73757072656d756d; asc supremum;;---------------------TRANSACTION 690056, ACTIVE 36 sec67 lock struct(s), heap size 13864, 8195 row lock(s), undo log entries 23MySQL thread id 18224, OS thread handle 0x7fdf63bdf700, query id 686331 172.17.0.1 root--------FILE I/O--------I/O thread 0 state: waiting for completed aio requests (insert buffer thread)I/O thread 1 state: waiting for completed aio requests (log thread)I/O thread 2 state: waiting for completed aio requests (read thread)I/O thread 3 state: waiting for completed aio requests (read thread)I/O thread 4 state: waiting for completed aio requests (read thread)I/O thread 5 state: waiting for completed aio requests (read thread)I/O thread 6 state: waiting for completed aio requests (write thread)I/O thread 7 state: waiting for completed aio requests (write thread)I/O thread 8 state: waiting for completed aio requests (write thread)I/O thread 9 state: waiting for completed aio requests (write thread)Pending normal aio reads: 0 [0, 0, 0, 0] , aio writes: 0 [0, 0, 0, 0] ,ibuf aio reads: 0, log i/o's: 0, sync i/o's: 0Pending flushes (fsync) log: 0; buffer pool: 04606 OS file reads, 96239 OS file writes, 65171 OS fsyncs0.00 reads/s, 0 avg bytes/read, 0.00 writes/s, 0.00 fsyncs/s-------------------------------------INSERT BUFFER AND ADAPTIVE HASH INDEX-------------------------------------Ibuf: size 1, free list len 0, seg size 2, 22 mergesmerged operations:insert 29, delete mark 421, delete 364discarded operations:insert 0, delete mark 0, delete 0Hash table size 276671, node heap has 26 buffer(s)0.00 hash searches/s, 0.00 non-hash searches/s---LOG---Log sequence number 668395471Log flushed up to 668395471Pages flushed up to 668395471Last checkpoint at 6683954710 pending log writes, 0 pending chkp writes33363 log i/o's done, 0.00 log i/o's/second----------------------BUFFER POOL AND MEMORY----------------------Total memory allocated 137363456; in additional pool allocated 0Dictionary memory allocated 959373Buffer pool size 8191Free buffers 1028Database pages 7137Old database pages 2614Modified db pages 0Pending reads 0Pending writes: LRU 0, flush list 0, single page 0Pages made young 3270, not young 253620.00 youngs/s, 0.00 non-youngs/sPages read 3915, created 13555, written 485270.00 reads/s, 0.00 creates/s, 0.00 writes/sBuffer pool hit rate 1000 1000, young-making rate 0 1000 not 0 1000Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/sLRU len: 7137, unzip_LRU len: 0I/O sum[16]:cur[0], unzip sum[0]:cur[0]--------------ROW OPERATIONS--------------0 queries inside InnoDB, 0 queries in queue0 read views open inside InnoDBMain thread process no. 1, id 140600574822144, state: sleepingNumber of rows inserted 385622, updated 20256, deleted 79, read 137880810.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.50 reads/s----------------------------END OF INNODB MONITOR OUTPUT============================

文章转载自java知路,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




