Deadlock found when trying to get lock; try restarting transaction

一.错误日志

场景:多线程插入数据库,大概100个线程都在同一张表做插入。

2021-08-11 20:10:00.674 DEBUG 1 --- [executorAddData-3] c.b.p.r.g.S.addBatchStrategyRunData      : <==    Updates: 4
2021-08-11 20:10:00.682 DEBUG 1 --- [executorAddData-4] c.b.p.r.g.S.addBatchStrategyRunData      : ==>  Preparing: insert into granting_strategy_run_result ( id, granting_strategy_run_id, biz_id, biz_source, model_id, model_type, model_name, model_query_item, model_sort, granting_status, result_info, credit_investigation_id, sn, credit_amount, tags, del_flag, create_by, create_date, update_by, update_date, client_id ) values ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, now(), ? ) , ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, now(), ? ) , ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, now(), ? ) , ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, now(), ? )
2021-08-11 20:10:00.683 DEBUG 1 --- [executorAddData-4] c.b.p.r.g.S.addBatchStrategyRunData      : ==> Parameters: b9e9c29cc5cb45c1812e8b193e216101(String), ff68f5f79b7a46ef852a8c754d7343b2(String), cec281f61a474bfa985db5f7518b2648(String), 1(Integer), cdd8acf08759423a9c45a8c45a70d7c2(String), 1000(String), 反欺诈必定人工(String), rw_br_antifraud(String), 1(Integer), 20(Integer), null, null, null, null, 反欺诈准入(String), null, null, null, null, 681db09973e04faca9768193f9693749(String), ff68f5f79b7a46ef852a8c754d7343b2(String), cec281f61a474bfa985db5f7518b2648(String), 1(Integer), ee2daa4ab0ca464a8136c7958ea41568(String), 1001(String), 智信60分0529(String), (String), 2(Integer), 20(Integer), null, null, null, null, 智信分(String), null, null, null, null, 42f7ecfc11a942deaa52f13b4e233185(String), ff68f5f79b7a46ef852a8c754d7343b2(String), cec281f61a474bfa985db5f7518b2648(String), 1(Integer), d2dd4625b52c4c919f9ffdd13311e7ba(String), 1001(String), 软信息60分0529(String), (String), 3(Integer), 20(Integer), null, null, null, null, 软信息评分(String), null, null, null, null, 5852ee0400c14a87993bbae91bd5b3f6(String), ff68f5f79b7a46ef852a8c754d7343b2(String), cec281f61a474bfa985db5f7518b2648(String), 1(Integer), 662d0f801ef7483d8a248ab146812c77(String), 1002(String), 额度五万(String), a(String), 4(Integer), 20(Integer), null, null, null, null, 额度测算(String), null, null, null, null
2021-08-11 20:10:00.685 DEBUG 1 --- [executorAddData-4] c.b.p.r.g.S.addBatchStrategyRunData      : <==    Updates: 4
2021-08-11 20:10:00.688 DEBUG 1 --- [executorAddData-2] c.b.p.r.g.S.addBatchStrategyRunData      : ==>  Preparing: insert into granting_strategy_run_result ( id, granting_strategy_run_id, biz_id, biz_source, model_id, model_type, model_name, model_query_item, model_sort, granting_status, result_info, credit_investigation_id, sn, credit_amount, tags, del_flag, create_by, create_date, update_by, update_date, client_id ) values ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, now(), ? ) , ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, now(), ? ) , ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, now(), ? ) , ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, now(), ? )
2021-08-11 20:10:00.688 DEBUG 1 --- [executorAddData-2] c.b.p.r.g.S.addBatchStrategyRunData      : ==> Parameters: 753c837af3044547a5ff35737d758c40(String), 79af8862e9924cd6ae6190179c9d4e3f(String), 38a3f42d7b7047fc90cf6e9d3a9bf740(String), 1(Integer), cdd8acf08759423a9c45a8c45a70d7c2(String), 1000(String), 反欺诈必定人工(String), rw_br_antifraud(String), 1(Integer), 20(Integer), null, null, null, null, 反欺诈准入(String), null, null, null, null, 6aa180d76d1b43e49f73614e43c380a9(String), 79af8862e9924cd6ae6190179c9d4e3f(String), 38a3f42d7b7047fc90cf6e9d3a9bf740(String), 1(Integer), ee2daa4ab0ca464a8136c7958ea41568(String), 1001(String), 智信60分0529(String), (String), 2(Integer), 20(Integer), null, null, null, null, 智信分(String), null, null, null, null, 0464252baba94f90bb05fe34bfec59a6(String), 79af8862e9924cd6ae6190179c9d4e3f(String), 38a3f42d7b7047fc90cf6e9d3a9bf740(String), 1(Integer), d2dd4625b52c4c919f9ffdd13311e7ba(String), 1001(String), 软信息60分0529(String), (String), 3(Integer), 20(Integer), null, null, null, null, 软信息评分(String), null, null, null, null, 32a13f5c34ae4d8bb45b5d964298e69d(String), 79af8862e9924cd6ae6190179c9d4e3f(String), 38a3f42d7b7047fc90cf6e9d3a9bf740(String), 1(Integer), 662d0f801ef7483d8a248ab146812c77(String), 1002(String), 额度五万(String), a(String), 4(Integer), 20(Integer), null, null, null, null, 额度测算(String), null, null, null, null
2021-08-11 20:10:00.689 DEBUG 1 --- [executorAddData-2] c.b.p.r.g.S.addBatchStrategyRunData      : <==    Updates: 4
2021-08-11 20:10:00.689 DEBUG 1 --- [executorAddData-5] c.b.p.r.g.S.addBatchStrategyRunData      : ==>  Preparing: insert into granting_strategy_run_result ( id, granting_strategy_run_id, biz_id, biz_source, model_id, model_type, model_name, model_query_item, model_sort, granting_status, result_info, credit_investigation_id, sn, credit_amount, tags, del_flag, create_by, create_date, update_by, update_date, client_id ) values ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, now(), ? ) , ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, now(), ? ) , ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, now(), ? ) , ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, now(), ? )
2021-08-11 20:10:00.690 DEBUG 1 --- [executorAddData-5] c.b.p.r.g.S.addBatchStrategyRunData      : ==> Parameters: 20071b6007814bf695bee25bf2d53061(String), 72dad7803a5640aa81670116a9de28de(String), d9d404afa0374351a50cc8b4649b8699(String), 1(Integer), cdd8acf08759423a9c45a8c45a70d7c2(String), 1000(String), 反欺诈必定人工(String), rw_br_antifraud(String), 1(Integer), 20(Integer), null, null, null, null, 反欺诈准入(String), null, null, null, null, c02afc3e9b8c49f49c491b4f46393e29(String), 72dad7803a5640aa81670116a9de28de(String), d9d404afa0374351a50cc8b4649b8699(String), 1(Integer), ee2daa4ab0ca464a8136c7958ea41568(String), 1001(String), 智信60分0529(String), (String), 2(Integer), 20(Integer), null, null, null, null, 智信分(String), null, null, null, null, cdd3b24a5b4944c3928234fafa6f7b0b(String), 72dad7803a5640aa81670116a9de28de(String), d9d404afa0374351a50cc8b4649b8699(String), 1(Integer), d2dd4625b52c4c919f9ffdd13311e7ba(String), 1001(String), 软信息60分0529(String), (String), 3(Integer), 20(Integer), null, null, null, null, 软信息评分(String), null, null, null, null, bd7b6dd48bf843478b42c3ea647e286b(String), 72dad7803a5640aa81670116a9de28de(String), d9d404afa0374351a50cc8b4649b8699(String), 1(Integer), 662d0f801ef7483d8a248ab146812c77(String), 1002(String), 额度五万(String), a(String), 4(Integer), 20(Integer), null, null, null, null, 额度测算(String), null, null, null, null
2021-08-11 20:10:00.691 DEBUG 1 --- [executorAddData-5] c.b.p.r.g.S.addBatchStrategyRunData      : <==    Updates: 4
2021-08-11 20:10:00.833 DEBUG 1 --- [executorAddData-1] c.b.p.r.g.S.addBatchStrategyRunData      : ==>  Preparing: insert into granting_strategy_run_result ( id, granting_strategy_run_id, biz_id, biz_source, model_id, model_type, model_name, model_query_item, model_sort, granting_status, result_info, credit_investigation_id, sn, credit_amount, tags, del_flag, create_by, create_date, update_by, update_date, client_id ) values ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, now(), ? ) , ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, now(), ? ) , ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, now(), ? ) , ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, now(), ? )
2021-08-11 20:10:00.834 DEBUG 1 --- [executorAddData-1] c.b.p.r.g.S.addBatchStrategyRunData      : ==> Parameters: 7318c8e4087a44e0bea1f9c42d24ac61(String), 1e1343fb65994f4b97d8f3686df45f4a(String), 44c98a3ac9734e169c7db45b11d43bd8(String), 1(Integer), cdd8acf08759423a9c45a8c45a70d7c2(String), 1000(String), 反欺诈必定人工(String), rw_br_antifraud(String), 1(Integer), 20(Integer), null, null, null, null, 反欺诈准入(String), null, null, null, null, 2a976fadc6e448a995d5c6c05183274d(String), 1e1343fb65994f4b97d8f3686df45f4a(String), 44c98a3ac9734e169c7db45b11d43bd8(String), 1(Integer), ee2daa4ab0ca464a8136c7958ea41568(String), 1001(String), 智信60分0529(String), (String), 2(Integer), 20(Integer), null, null, null, null, 智信分(String), null, null, null, null, 83cda058b01040dbb5c97b452208a85f(String), 1e1343fb65994f4b97d8f3686df45f4a(String), 44c98a3ac9734e169c7db45b11d43bd8(String), 1(Integer), d2dd4625b52c4c919f9ffdd13311e7ba(String), 1001(String), 软信息60分0529(String), (String), 3(Integer), 20(Integer), null, null, null, null, 软信息评分(String), null, null, null, null, ae6905a8715840ba96bebff7ead93a47(String), 1e1343fb65994f4b97d8f3686df45f4a(String), 44c98a3ac9734e169c7db45b11d43bd8(String), 1(Integer), 662d0f801ef7483d8a248ab146812c77(String), 1002(String), 额度五万(String), a(String), 4(Integer), 20(Integer), null, null, null, null, 额度测算(String), null, null, null, null
2021-08-11 20:10:00.838 DEBUG 1 --- [executorAddData-1] c.b.p.r.g.S.addBatchStrategyRunData      : <==    Updates: 4
2021-08-11 20:10:00.845 DEBUG 1 --- [executorAddData-3] c.b.p.r.g.S.addBatchStrategyRunData      : ==>  Preparing: insert into granting_strategy_run_result ( id, granting_strategy_run_id, biz_id, biz_source, model_id, model_type, model_name, model_query_item, model_sort, granting_status, result_info, credit_investigation_id, sn, credit_amount, tags, del_flag, create_by, create_date, update_by, update_date, client_id ) values ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, now(), ? ) , ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, now(), ? ) , ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, now(), ? ) , ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, now(), ? )
2021-08-11 20:10:00.845 DEBUG 1 --- [executorAddData-3] c.b.p.r.g.S.addBatchStrategyRunData      : ==> Parameters: 409558e55e95439b9f46bb5f67776f1a(String), 9dbc8591cff14851929edfdd294d9041(String), 92842f7a126e42a595b4981c7eebe2ba(String), 1(Integer), cdd8acf08759423a9c45a8c45a70d7c2(String), 1000(String), 反欺诈必定人工(String), rw_br_antifraud(String), 1(Integer), 20(Integer), null, null, null, null, 反欺诈准入(String), null, null, null, null, d95cb186222d453087afe5643cf67e9e(String), 9dbc8591cff14851929edfdd294d9041(String), 92842f7a126e42a595b4981c7eebe2ba(String), 1(Integer), ee2daa4ab0ca464a8136c7958ea41568(String), 1001(String), 智信60分0529(String), (String), 2(Integer), 20(Integer), null, null, null, null, 智信分(String), null, null, null, null, a647c25bc1314ce58ed9785dd3b0aac7(String), 9dbc8591cff14851929edfdd294d9041(String), 92842f7a126e42a595b4981c7eebe2ba(String), 1(Integer), d2dd4625b52c4c919f9ffdd13311e7ba(String), 1001(String), 软信息60分0529(String), (String), 3(Integer), 20(Integer), null, null, null, null, 软信息评分(String), null, null, null, null, 8801da149d27492b848e76f5718d9224(String), 9dbc8591cff14851929edfdd294d9041(String), 92842f7a126e42a595b4981c7eebe2ba(String), 1(Integer), 662d0f801ef7483d8a248ab146812c77(String), 1002(String), 额度五万(String), a(String), 4(Integer), 20(Integer), null, null, null, null, 额度测算(String), null, null, null, null
2021-08-11 20:10:00.846 DEBUG 1 --- [executorAddData-3] c.b.p.r.g.S.addBatchStrategyRunData      : <==    Updates: 4
2021-08-11 20:10:00.877 DEBUG 1 --- [executorAddData-4] c.b.p.r.g.S.addBatchStrategyRunData      : ==>  Preparing: insert into granting_strategy_run_result ( id, granting_strategy_run_id, biz_id, biz_source, model_id, model_type, model_name, model_query_item, model_sort, granting_status, result_info, credit_investigation_id, sn, credit_amount, tags, del_flag, create_by, create_date, update_by, update_date, client_id ) values ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, now(), ? ) , ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, now(), ? ) , ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, now(), ? ) , ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, now(), ? )
2021-08-11 20:10:00.878 DEBUG 1 --- [executorAddData-4] c.b.p.r.g.S.addBatchStrategyRunData      : ==> Parameters: 5af82fd1863e4fb18d90b18e44b4e820(String), 3afaa800b8534c13976fd5854963ef72(String), 311825777fec4932869a99b5d7f96f4c(String), 1(Integer), cdd8acf08759423a9c45a8c45a70d7c2(String), 1000(String), 反欺诈必定人工(String), rw_br_antifraud(String), 1(Integer), 20(Integer), null, null, null, null, 反欺诈准入(String), null, null, null, null, 5c15bafa39954e2db8676cb1591ddd24(String), 3afaa800b8534c13976fd5854963ef72(String), 311825777fec4932869a99b5d7f96f4c(String), 1(Integer), ee2daa4ab0ca464a8136c7958ea41568(String), 1001(String), 智信60分0529(String), (String), 2(Integer), 20(Integer), null, null, null, null, 智信分(String), null, null, null, null, 0f41b850f10d4592863d2480ecaa619e(String), 3afaa800b8534c13976fd5854963ef72(String), 311825777fec4932869a99b5d7f96f4c(String), 1(Integer), d2dd4625b52c4c919f9ffdd13311e7ba(String), 1001(String), 软信息60分0529(String), (String), 3(Integer), 20(Integer), null, null, null, null, 软信息评分(String), null, null, null, null, fe3464ca3aea47ceb84c8565ecb22e38(String), 3afaa800b8534c13976fd5854963ef72(String), 311825777fec4932869a99b5d7f96f4c(String), 1(Integer), 662d0f801ef7483d8a248ab146812c77(String), 1002(String), 额度五万(String), a(String), 4(Integer), 20(Integer), null, null, null, null, 额度测算(String), null, null, null, null
2021-08-11 20:10:00.880 DEBUG 1 --- [executorAddData-4] c.b.p.r.g.S.addBatchStrategyRunData      : <==    Updates: 4
2021-08-11 20:10:00.913 DEBUG 1 --- [executorAddData-2] c.b.p.r.g.S.addBatchStrategyRunData      : ==>  Preparing: insert into granting_strategy_run_result ( id, granting_strategy_run_id, biz_id, biz_source, model_id, model_type, model_name, model_query_item, model_sort, granting_status, result_info, credit_investigation_id, sn, credit_amount, tags, del_flag, create_by, create_date, update_by, update_date, client_id ) values ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, now(), ? ) , ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, now(), ? ) , ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, now(), ? ) , ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, now(), ? )
2021-08-11 20:10:00.914 DEBUG 1 --- [executorAddData-2] c.b.p.r.g.S.addBatchStrategyRunData      : ==> Parameters: 24737a345c3e401684c789111bb40d9d(String), e5be8c46b65d43c4874caa9324e70e78(String), 584f9a42f1d14004b17e4b17acd6cee8(String), 1(Integer), cdd8acf08759423a9c45a8c45a70d7c2(String), 1000(String), 反欺诈必定人工(String), rw_br_antifraud(String), 1(Integer), 20(Integer), null, null, null, null, 反欺诈准入(String), null, null, null, null, 3ad416795d4e4147985cda68cc3fcfb3(String), e5be8c46b65d43c4874caa9324e70e78(String), 584f9a42f1d14004b17e4b17acd6cee8(String), 1(Integer), ee2daa4ab0ca464a8136c7958ea41568(String), 1001(String), 智信60分0529(String), (String), 2(Integer), 20(Integer), null, null, null, null, 智信分(String), null, null, null, null, b5f59b3ff06e4c0882814d4e48ce6bc8(String), e5be8c46b65d43c4874caa9324e70e78(String), 584f9a42f1d14004b17e4b17acd6cee8(String), 1(Integer), d2dd4625b52c4c919f9ffdd13311e7ba(String), 1001(String), 软信息60分0529(String), (String), 3(Integer), 20(Integer), null, null, null, null, 软信息评分(String), null, null, null, null, 98170aa8f12a4d26b4dc498a70e5f0b8(String), e5be8c46b65d43c4874caa9324e70e78(String), 584f9a42f1d14004b17e4b17acd6cee8(String), 1(Integer), 662d0f801ef7483d8a248ab146812c77(String), 1002(String), 额度五万(String), a(String), 4(Integer), 20(Integer), null, null, null, null, 额度测算(String), null, null, null, null
2021-08-11 20:10:00.915 DEBUG 1 --- [executorAddData-2] c.b.p.r.g.S.addBatchStrategyRunData      : <==    Updates: 4
2021-08-11 20:10:00.966 DEBUG 1 --- [executorAddData-5] c.b.p.r.g.S.addBatchStrategyRunData      : ==>  Preparing: insert into granting_strategy_run_result ( id, granting_strategy_run_id, biz_id, biz_source, model_id, model_type, model_name, model_query_item, model_sort, granting_status, result_info, credit_investigation_id, sn, credit_amount, tags, del_flag, create_by, create_date, update_by, update_date, client_id ) values ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, now(), ? ) , ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, now(), ? ) , ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, now(), ? ) , ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, now(), ? )
2021-08-11 20:10:00.967 DEBUG 1 --- [executorAddData-5] c.b.p.r.g.S.addBatchStrategyRunData      : ==> Parameters: c941e9a61ab04d2e9ed73265a73b6981(String), a83540b8bc5243caa6ae0df424177902(String), 63c1351bc0954a4ba0c713c12d633063(String), 1(Integer), cdd8acf08759423a9c45a8c45a70d7c2(String), 1000(String), 反欺诈必定人工(String), rw_br_antifraud(String), 1(Integer), 20(Integer), null, null, null, null, 反欺诈准入(String), null, null, null, null, 95b26aeedb56485fa0f240810db952af(String), a83540b8bc5243caa6ae0df424177902(String), 63c1351bc0954a4ba0c713c12d633063(String), 1(Integer), ee2daa4ab0ca464a8136c7958ea41568(String), 1001(String), 智信60分0529(String), (String), 2(Integer), 20(Integer), null, null, null, null, 智信分(String), null, null, null, null, 1f3cd38d88fa4ac992759be5973bf246(String), a83540b8bc5243caa6ae0df424177902(String), 63c1351bc0954a4ba0c713c12d633063(String), 1(Integer), d2dd4625b52c4c919f9ffdd13311e7ba(String), 1001(String), 软信息60分0529(String), (String), 3(Integer), 20(Integer), null, null, null, null, 软信息评分(String), null, null, null, null, 47f1e03cda75413cbfadf497d6baceca(String), a83540b8bc5243caa6ae0df424177902(String), 63c1351bc0954a4ba0c713c12d633063(String), 1(Integer), 662d0f801ef7483d8a248ab146812c77(String), 1002(String), 额度五万(String), a(String), 4(Integer), 20(Integer), null, null, null, null, 额度测算(String), null, null, null, null
2021-08-11 20:10:00.968 DEBUG 1 --- [executorAddData-5] c.b.p.r.g.S.addBatchStrategyRunData      : <==    Updates: 4
2021-08-11 20:10:00.984 DEBUG 1 --- [executorAddData-1] c.b.p.r.g.S.addBatchStrategyRunData      : ==>  Preparing: insert into granting_strategy_run_result ( id, granting_strategy_run_id, biz_id, biz_source, model_id, model_type, model_name, model_query_item, model_sort, granting_status, result_info, credit_investigation_id, sn, credit_amount, tags, del_flag, create_by, create_date, update_by, update_date, client_id ) values ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, now(), ? ) , ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, now(), ? ) , ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, now(), ? ) , ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, now(), ? )
2021-08-11 20:10:00.984 DEBUG 1 --- [executorAddData-1] c.b.p.r.g.S.addBatchStrategyRunData      : ==> Parameters: 269a840fec1b4760b77e4a8b757ebc2a(String), d1729eb96f444d688849da854627c5c9(String), 0d7429471a0b4f4fbbded37fee9673b2(String), 1(Integer), cdd8acf08759423a9c45a8c45a70d7c2(String), 1000(String), 反欺诈必定人工(String), rw_br_antifraud(String), 1(Integer), 20(Integer), null, null, null, null, 反欺诈准入(String), null, null, null, null, 1e11187fa9ae4f0aa3518873ea01898c(String), d1729eb96f444d688849da854627c5c9(String), 0d7429471a0b4f4fbbded37fee9673b2(String), 1(Integer), ee2daa4ab0ca464a8136c7958ea41568(String), 1001(String), 智信60分0529(String), (String), 2(Integer), 20(Integer), null, null, null, null, 智信分(String), null, null, null, null, 858e181468d94697aa26204b0e86a1a1(String), d1729eb96f444d688849da854627c5c9(String), 0d7429471a0b4f4fbbded37fee9673b2(String), 1(Integer), d2dd4625b52c4c919f9ffdd13311e7ba(String), 1001(String), 软信息60分0529(String), (String), 3(Integer), 20(Integer), null, null, null, null, 软信息评分(String), null, null, null, null, 9a4ccf6f9028410aa7859d3fece7aecf(String), d1729eb96f444d688849da854627c5c9(String), 0d7429471a0b4f4fbbded37fee9673b2(String), 1(Integer), 662d0f801ef7483d8a248ab146812c77(String), 1002(String), 额度五万(String), a(String), 4(Integer), 20(Integer), null, null, null, null, 额度测算(String), null, null, null, null
2021-08-11 20:10:00.992 DEBUG 1 --- [executorAddData-1] c.b.p.r.g.S.addBatchStrategyRunData      : <==    Updates: 4
2021-08-11 20:10:01.017 DEBUG 1 --- [executorAddData-3] c.b.p.r.g.S.addBatchStrategyRunData      : ==>  Preparing: insert into granting_strategy_run_result ( id, granting_strategy_run_id, biz_id, biz_source, model_id, model_type, model_name, model_query_item, model_sort, granting_status, result_info, credit_investigation_id, sn, credit_amount, tags, del_flag, create_by, create_date, update_by, update_date, client_id ) values ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, now(), ? ) , ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, now(), ? ) , ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, now(), ? ) , ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, now(), ? )
2021-08-11 20:10:01.018 DEBUG 1 --- [executorAddData-3] c.b.p.r.g.S.addBatchStrategyRunData      : ==> Parameters: 65ad5319262145baa1b44419c63d4990(String), 8232f48c2a5a4aad8fc7511be15c6081(String), 6590501aabb44102b8aea5415836bf28(String), 1(Integer), cdd8acf08759423a9c45a8c45a70d7c2(String), 1000(String), 反欺诈必定人工(String), rw_br_antifraud(String), 1(Integer), 20(Integer), null, null, null, null, 反欺诈准入(String), null, null, null, null, 3c18cd27bec845ca8baa689a3d9e491b(String), 8232f48c2a5a4aad8fc7511be15c6081(String), 6590501aabb44102b8aea5415836bf28(String), 1(Integer), ee2daa4ab0ca464a8136c7958ea41568(String), 1001(String), 智信60分0529(String), (String), 2(Integer), 20(Integer), null, null, null, null, 智信分(String), null, null, null, null, f851bc35f53d4fce9e5ad919bd11d8bc(String), 8232f48c2a5a4aad8fc7511be15c6081(String), 6590501aabb44102b8aea5415836bf28(String), 1(Integer), d2dd4625b52c4c919f9ffdd13311e7ba(String), 1001(String), 软信息60分0529(String), (String), 3(Integer), 20(Integer), null, null, null, null, 软信息评分(String), null, null, null, null, b46e5871b80646a9a2a82b68f4ece484(String), 8232f48c2a5a4aad8fc7511be15c6081(String), 6590501aabb44102b8aea5415836bf28(String), 1(Integer), 662d0f801ef7483d8a248ab146812c77(String), 1002(String), 额度五万(String), a(String), 4(Integer), 20(Integer), null, null, null, null, 额度测算(String), null, null, null, null
2021-08-11 20:10:01.019 DEBUG 1 --- [executorAddData-3] c.b.p.r.g.S.addBatchStrategyRunData      : <==    Updates: 4
2021-08-11 20:10:01.039 DEBUG 1 --- [executorAddData-4] c.b.p.r.g.S.addBatchStrategyRunData      : ==>  Preparing: insert into granting_strategy_run_result ( id, granting_strategy_run_id, biz_id, biz_source, model_id, model_type, model_name, model_query_item, model_sort, granting_status, result_info, credit_investigation_id, sn, credit_amount, tags, del_flag, create_by, create_date, update_by, update_date, client_id ) values ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, now(), ? ) , ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, now(), ? ) , ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, now(), ? ) , ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, now(), ? )
2021-08-11 20:10:01.040 DEBUG 1 --- [executorAddData-4] c.b.p.r.g.S.addBatchStrategyRunData      : ==> Parameters: 3350db0c8caa453e95fa327e1ebca2a0(String), da005cc94e1445bd843d289cc67fcfe3(String), fed580474a9a442b9e973bd19f2fdae4(String), 1(Integer), cdd8acf08759423a9c45a8c45a70d7c2(String), 1000(String), 反欺诈必定人工(String), rw_br_antifraud(String), 1(Integer), 20(Integer), null, null, null, null, 反欺诈准入(String), null, null, null, null, ee3c6617fbf049709b9ce47559ef8777(String), da005cc94e1445bd843d289cc67fcfe3(String), fed580474a9a442b9e973bd19f2fdae4(String), 1(Integer), ee2daa4ab0ca464a8136c7958ea41568(String), 1001(String), 智信60分0529(String), (String), 2(Integer), 20(Integer), null, null, null, null, 智信分(String), null, null, null, null, 829bcb4185c94702aceee2d577ef7c20(String), da005cc94e1445bd843d289cc67fcfe3(String), fed580474a9a442b9e973bd19f2fdae4(String), 1(Integer), d2dd4625b52c4c919f9ffdd13311e7ba(String), 1001(String), 软信息60分0529(String), (String), 3(Integer), 20(Integer), null, null, null, null, 软信息评分(String), null, null, null, null, 6b88773c639746618217d3658b24f1d4(String), da005cc94e1445bd843d289cc67fcfe3(String), fed580474a9a442b9e973bd19f2fdae4(String), 1(Integer), 662d0f801ef7483d8a248ab146812c77(String), 1002(String), 额度五万(String), a(String), 4(Integer), 20(Integer), null, null, null, null, 额度测算(String), null, null, null, null
2021-08-11 20:10:01.056 DEBUG 1 --- [executorAddData-4] c.b.p.r.g.S.addBatchStrategyRunData      : <==    Updates: 4
2021-08-11 20:10:01.084 DEBUG 1 --- [executorAddData-2] c.b.p.r.g.S.addBatchStrategyRunData      : ==>  Preparing: insert into granting_strategy_run_result ( id, granting_strategy_run_id, biz_id, biz_source, model_id, model_type, model_name, model_query_item, model_sort, granting_status, result_info, credit_investigation_id, sn, credit_amount, tags, del_flag, create_by, create_date, update_by, update_date, client_id ) values ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, now(), ? ) , ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, now(), ? ) , ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, now(), ? ) , ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, now(), ? )
2021-08-11 20:10:01.085 DEBUG 1 --- [executorAddData-2] c.b.p.r.g.S.addBatchStrategyRunData      : ==> Parameters: 7f852bb259b647fea919a5b7eb35237a(String), 7acb42a4d5314e72b2db14f7ae8512ef(String), 9d8a6e5456c14663bbc6919626c9b43b(String), 1(Integer), cdd8acf08759423a9c45a8c45a70d7c2(String), 1000(String), 反欺诈必定人工(String), rw_br_antifraud(String), 1(Integer), 20(Integer), null, null, null, null, 反欺诈准入(String), null, null, null, null, 4730b0fe5d964909bd21896f5dc36722(String), 7acb42a4d5314e72b2db14f7ae8512ef(String), 9d8a6e5456c14663bbc6919626c9b43b(String), 1(Integer), ee2daa4ab0ca464a8136c7958ea41568(String), 1001(String), 智信60分0529(String), (String), 2(Integer), 20(Integer), null, null, null, null, 智信分(String), null, null, null, null, 3fb248cf9bbf4af0aff20fb93c59aca6(String), 7acb42a4d5314e72b2db14f7ae8512ef(String), 9d8a6e5456c14663bbc6919626c9b43b(String), 1(Integer), d2dd4625b52c4c919f9ffdd13311e7ba(String), 1001(String), 软信息60分0529(String), (String), 3(Integer), 20(Integer), null, null, null, null, 软信息评分(String), null, null, null, null, 81e2b0b1cf794081af7b6a3b3516d980(String), 7acb42a4d5314e72b2db14f7ae8512ef(String), 9d8a6e5456c14663bbc6919626c9b43b(String), 1(Integer), 662d0f801ef7483d8a248ab146812c77(String), 1002(String), 额度五万(String), a(String), 4(Integer), 20(Integer), null, null, null, null, 额度测算(String), null, null, null, null
2021-08-11 20:10:01.086 DEBUG 1 --- [executorAddData-2] c.b.p.r.g.S.addBatchStrategyRunData      : <==    Updates: 4
2021-08-11 20:10:01.112 DEBUG 1 --- [executorAddData-5] c.b.p.r.g.S.addBatchStrategyRunData      : ==>  Preparing: insert into granting_strategy_run_result ( id, granting_strategy_run_id, biz_id, biz_source, model_id, model_type, model_name, model_query_item, model_sort, granting_status, result_info, credit_investigation_id, sn, credit_amount, tags, del_flag, create_by, create_date, update_by, update_date, client_id ) values ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, now(), ? ) , ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, now(), ? ) , ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, now(), ? ) , ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, now(), ? )
2021-08-11 20:10:01.112 DEBUG 1 --- [executorAddData-5] c.b.p.r.g.S.addBatchStrategyRunData      : ==> Parameters: b0f4d91efe034b8ab5a8d6eeaaacd781(String), a94ca0b242834cef9eba7e620e2351e1(String), d9a1f36d75114ef3a40c42a3a921945c(String), 1(Integer), cdd8acf08759423a9c45a8c45a70d7c2(String), 1000(String), 反欺诈必定人工(String), rw_br_antifraud(String), 1(Integer), 20(Integer), null, null, null, null, 反欺诈准入(String), null, null, null, null, fc8d03006ca9459f9928569f989db3f2(String), a94ca0b242834cef9eba7e620e2351e1(String), d9a1f36d75114ef3a40c42a3a921945c(String), 1(Integer), ee2daa4ab0ca464a8136c7958ea41568(String), 1001(String), 智信60分0529(String), (String), 2(Integer), 20(Integer), null, null, null, null, 智信分(String), null, null, null, null, 15a56d26a38146319b16f8cf41e4309a(String), a94ca0b242834cef9eba7e620e2351e1(String), d9a1f36d75114ef3a40c42a3a921945c(String), 1(Integer), d2dd4625b52c4c919f9ffdd13311e7ba(String), 1001(String), 软信息60分0529(String), (String), 3(Integer), 20(Integer), null, null, null, null, 软信息评分(String), null, null, null, null, 6dc1990efb5046f2a21f48e53d337923(String), a94ca0b242834cef9eba7e620e2351e1(String), d9a1f36d75114ef3a40c42a3a921945c(String), 1(Integer), 662d0f801ef7483d8a248ab146812c77(String), 1002(String), 额度五万(String), a(String), 4(Integer), 20(Integer), null, null, null, null, 额度测算(String), null, null, null, null
2021-08-11 20:10:01.127 ERROR 1 --- [executorAddData-5] .a.i.SimpleAsyncUncaughtExceptionHandler : Unexpected exception occurred invoking async method: public void com.bk.product.service.composite.granting.impl.StrategyRunCompositeServiceImpl.addStrategyRunData(com.bk.product.command.granting.AddStrategyRunCommand)
org.springframework.dao.DeadlockLoserDataAccessException: 
### Error updating database.  Cause: com.mysql.cj.jdbc.exceptions.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction
### The error may exist in URL [jar:file:/bk-product-server.jar!/BOOT-INF/lib/bk_product_server_dao-5.15.103-SNAPSHOT.jar!/com/bk/product/repository/granting/StrategyRunRespository.xml]
### The error may involve com.bk.product.repository.granting.StrategyRunRespository.addBatchStrategyRunData-Inline
### The error occurred while setting parameters
### SQL: insert into granting_strategy_run_result         (         id, granting_strategy_run_id, biz_id,         biz_source, model_id, model_type,         model_name, model_query_item, model_sort,         granting_status, result_info, credit_investigation_id,         sn, credit_amount, tags,         del_flag, create_by, create_date,         update_by, update_date, client_id         )         values                        (             ?, ?, ?,             ?, ?, ?,             ?, ?,             ?,             ?, ?,             ?,             ?, ?, ?,             ?, ?, now(),             ?, now(), ?             )          ,              (             ?, ?, ?,             ?, ?, ?,             ?, ?,             ?,             ?, ?,             ?,             ?, ?, ?,             ?, ?, now(),             ?, now(), ?             )          ,              (             ?, ?, ?,             ?, ?, ?,             ?, ?,             ?,             ?, ?,             ?,             ?, ?, ?,             ?, ?, now(),             ?, now(), ?             )          ,              (             ?, ?, ?,             ?, ?, ?,             ?, ?,             ?,             ?, ?,             ?,             ?, ?, ?,             ?, ?, now(),             ?, now(), ?             )
### Cause: com.mysql.cj.jdbc.exceptions.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction
; Deadlock found when trying to get lock; try restarting transaction; nested exception is com.mysql.cj.jdbc.exceptions.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction
    at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:271)
    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
    at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:88)
    at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:440)
    at com.sun.proxy.$Proxy178.insert(Unknown Source)
    at org.mybatis.spring.SqlSessionTemplate.insert(SqlSessionTemplate.java:271)
    at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:60)
    at com.baomidou.mybatisplus.core.override.MybatisMapperProxy$PlainMethodInvoker.invoke(MybatisMapperProxy.java:148)
    at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:89)
    at com.sun.proxy.$Proxy224.addBatchStrategyRunData(Unknown Source)
    at com.bk.product.service.composite.granting.impl.StrategyRunCompositeServiceImpl.addStrategyRunData(StrategyRunCompositeServiceImpl.java:75)
    at com.bk.product.service.composite.granting.impl.StrategyRunCompositeServiceImpl$$FastClassBySpringCGLIB$$8d8b70e9.invoke(<generated>)
    at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
    at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:771)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
    at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749)
    at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:367)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:118)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
    at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749)
    at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:95)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
    at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749)
    at org.springframework.aop.interceptor.AsyncExecutionInterceptor.lambda$invoke$0(AsyncExecutionInterceptor.java:115)
    at com.fw.common.threadpool.ContextAwareCallable.call(ContextAwareCallable.java:37)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Caused by: com.mysql.cj.jdbc.exceptions.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction
    at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:123)
    at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
    at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
    at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:953)
    at com.mysql.cj.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java:370)
    at com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44)
    at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.execute(HikariProxyPreparedStatement.java)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:59)
    at com.sun.proxy.$Proxy411.execute(Unknown Source)
    at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:47)
    at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:74)
    at sun.reflect.GeneratedMethodAccessor562.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:63)
    at com.sun.proxy.$Proxy407.update(Unknown Source)
    at com.baomidou.mybatisplus.core.executor.MybatisSimpleExecutor.doUpdate(MybatisSimpleExecutor.java:56)
    at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:117)
    at com.baomidou.mybatisplus.core.executor.MybatisCachingExecutor.update(MybatisCachingExecutor.java:85)
    at sun.reflect.GeneratedMethodAccessor364.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.ibatis.plugin.Invocation.proceed(Invocation.java:49)
    at com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor.intercept(MybatisPlusInterceptor.java:83)
    at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:61)
    at com.sun.proxy.$Proxy406.update(Unknown Source)
    at sun.reflect.GeneratedMethodAccessor364.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:63)
    at com.sun.proxy.$Proxy406.update(Unknown Source)
    at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:197)
    at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:184)
    at sun.reflect.GeneratedMethodAccessor593.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:426)
    ... 25 common frames omitted
View Code

 

二.分析

初步分析是由于100个线程在同一时间做100个事务提交,事务排队时间过长,重新发起事务,但是由于其他事务在做插入,查询,更新,锁定表,重新发起事务。导致死锁的发生。

目前还不能确定是事务的问题,还是代码的问题。

原因只是猜测,没有实际测试,等有时间详细测试

问题在于mysql插入是否会锁表,事务是否会锁表,什么情况下行的死锁会发生,表的死锁会发生

 

三.解决

暂时解决办法:插入表不用事务,即批量插入,异步开启线程不加事务

 

 

四.参考资料

https://blog.csdn.net/weixin_33739627/article/details/85892433?utm_medium=distribute.pc_relevant_t0.none-task-blog-2%7Edefault%7EBlogCommendFromMachineLearnPai2%7Edefault-1.control&depth_1-utm_source=distribute.pc_relevant_t0.none-task-blog-2%7Edefault%7EBlogCommendFromMachineLearnPai2%7Edefault-1.control

http://www.heartthinkdo.com/?p=910#422

 

https://blog.csdn.net/weixin_33966095/article/details/92259789?utm_medium=distribute.pc_relevant.none-task-blog-2~default~baidujs_baidulandingword~default-1.control&spm=1001.2101.3001.4242

posted @ 2021-08-16 18:13  24601  阅读(422)  评论(0编辑  收藏  举报