Version 2.1.5 Failed to try table 表名 write lock. timeout 3000 MILLISECONDS.

Viewed 118

想咨询一下,具体什么原因造成,有什么解决方案?
具体报错内容如下:
RuntimeLogger 2024-09-02 07:22:38,610 WARN (mysql-nio-pool-219|4837) [ConnectContext.kill():900] kill query from 113.110.215.233:1655, kill mysql connection: true
RuntimeLogger 2024-09-02 07:51:08,147 WARN (tablet stat mgr|28) [Table.tryWriteLock():228] Failed to try table UserRelation's write lock. timeout 3000 MILLISECONDS. Current owner: null
RuntimeLogger 2024-09-02 07:51:08,155 WARN (mysql-nio-pool-306|5869) [Table.tryWriteLock():228] Failed to try table UserRelation's write lock. timeout 10000 MILLISECONDS. Current owner: null
RuntimeLogger 2024-09-02 07:51:08,156 WARN (mysql-nio-pool-306|5869) [StmtExecutor.handleInsertStmt():2309] handle insert stmt fail: insert_d8c1b6eb6000497e_9ebb678ee8ceb5ed
org.apache.doris.common.UserException: errCode = 2, detailMessage = get tableList write lock timeout, tableList=(Table [id=76392590, name=Usr_SellerUserRelation, type=OLAP])
at org.apache.doris.transaction.GlobalTransactionMgr.commitAndPublishTransaction(GlobalTransactionMgr.java:281) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.transaction.GlobalTransactionMgr.commitAndPublishTransaction(GlobalTransactionMgr.java:270) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.qe.StmtExecutor.handleInsertStmt(StmtExecutor.java:2297) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.qe.StmtExecutor.executeByLegacy(StmtExecutor.java:924) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.qe.StmtExecutor.execute(StmtExecutor.java:588) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.qe.StmtExecutor.execute(StmtExecutor.java:517) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.qe.ConnectProcessor.executeQuery(ConnectProcessor.java:328) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.qe.ConnectProcessor.handleQuery(ConnectProcessor.java:206) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.qe.MysqlConnectProcessor.handleQuery(MysqlConnectProcessor.java:260) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.qe.MysqlConnectProcessor.dispatch(MysqlConnectProcessor.java:288) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.qe.MysqlConnectProcessor.processOnce(MysqlConnectProcessor.java:341) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.mysql.ReadListener.lambda$handleEvent$0(ReadListener.java:52) ~[doris-fe.jar:1.2-SNAPSHOT]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_352-352]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_352-352]
at java.lang.Thread.run(Thread.java:750) ~[?:1.8.0_352-352]
RuntimeLogger 2024-09-02 07:51:08,229 WARN (mysql-nio-pool-306|5869) [StmtExecutor.executeByLegacy():1000] errors when abort txn. stmt[172995, d8c1b6eb6000497e-9ebb678ee8ceb5ed]
org.apache.doris.transaction.TransactionNotFoundException: errCode = 2, detailMessage = transaction not found
at org.apache.doris.transaction.DatabaseTransactionMgr.abortTransaction(DatabaseTransactionMgr.java:1593) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.transaction.GlobalTransactionMgr.abortTransaction(GlobalTransactionMgr.java:342) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.transaction.GlobalTransactionMgr.abortTransaction(GlobalTransactionMgr.java:326) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.qe.StmtExecutor.executeByLegacy(StmtExecutor.java:996) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.qe.StmtExecutor.execute(StmtExecutor.java:588) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.qe.StmtExecutor.execute(StmtExecutor.java:517) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.qe.ConnectProcessor.executeQuery(ConnectProcessor.java:328) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.qe.ConnectProcessor.handleQuery(ConnectProcessor.java:206) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.qe.MysqlConnectProcessor.handleQuery(MysqlConnectProcessor.java:260) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.qe.MysqlConnectProcessor.dispatch(MysqlConnectProcessor.java:288) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.qe.MysqlConnectProcessor.processOnce(MysqlConnectProcessor.java:341) ~[doris-fe.jar:1.2-SNAPSHOT]
at org.apache.doris.mysql.ReadListener.lambda$handleEvent$0(ReadListener.java:52) ~[doris-fe.jar:1.2-SNAPSHOT]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_352-352]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_352-352]
at java.lang.Thread.run(Thread.java:750) ~[?:1.8.0_352-352]

1 Answers

解决方案:

  1. 对于insert 的导入改成 通过 stream load 导入
  2. 如果依然使用insert导入,建议使用group commit