合 StarRocks报错 Too many versions, please reduce your insert/load request rate
现象
日志 /usr/local/starrocks/fe/log/fe.warn.log报错: Too many versions, please reduce your insert/load request rate. tablet_id: 356542, version_count: 1001, limit: 1000
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | 2023-06-06 16:50:49,323 WARN (thrift-server-pool-49602|60530) [Coordinator.updateStatus():1278] one instance report fail throw updateStatus(), need cancel. job id: 414151, query id: 3c1d345f-0447-11ee-a84f-da55cd46762e, instance id: 3c1d345f-0447-11ee-a84f-da55cd46762f 2023-06-06 16:50:49,323 WARN (starrocks-mysql-nio-pool-6128|60559) [StmtExecutor.handleDMLStmt():1441] insert failed: Too many versions, please reduce your insert/load request rate. tablet_id: 356542, version_count: 1001, limit: 1000, replica_state: 1: be:172.16.0.186 2023-06-06 16:50:49,323 WARN (starrocks-mysql-nio-pool-6128|60559) [StmtExecutor.handleDMLStmt():1548] failed to handle stmt .... com.starrocks.common.DdlException: Too many versions, please reduce your insert/load request rate. tablet_id: 356542, version_count: 1001, limit: 1000, replica_state: 1: be:192.16.0.186 at com.starrocks.common.ErrorReport.reportDdlException(ErrorReport.java:95) ~[starrocks-fe.jar:?] at com.starrocks.qe.StmtExecutor.handleDMLStmt(StmtExecutor.java:1442) ~[starrocks-fe.jar:?] at com.starrocks.qe.StmtExecutor.execute(StmtExecutor.java:501) ~[starrocks-fe.jar:?] at com.starrocks.qe.ConnectProcessor.handleQuery(ConnectProcessor.java:348) ~[starrocks-fe.jar:?] at com.starrocks.qe.ConnectProcessor.dispatch(ConnectProcessor.java:462) ~[starrocks-fe.jar:?] at com.starrocks.qe.ConnectProcessor.processOnce(ConnectProcessor.java:728) ~[starrocks-fe.jar:?] at com.starrocks.mysql.nio.ReadListener.lambda$handleEvent$0(ReadListener.java:69) ~[starrocks-fe.jar:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_372] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_372] at java.lang.Thread.run(Thread.java:750) [?:1.8.0_372] |
发生 "close index channel failed" 和 "too many tablet versions" 错误应该如何处理?
上述报错是因为导入频率太快,数据没能及时合并 (Compaction) ,从而导致版本数超过支持的最大未合并版本数。默认支持的最大未合并版本数为 1000。可以通过如下方法解决上述报错:
增大单次导入的数据量,降低导入频率。
在 BE 的配置文件 be.conf 中修改以下配置,通过调整合并策略实现加快合并的目的:
123cumulative_compaction_num_threads_per_disk = 4base_compaction_num_threads_per_disk = 2cumulative_compaction_check_interval_seconds = 2本人提供Oracle(OCP、OCM)、MySQL(OCP)、PostgreSQL(PGCA、PGCE、PGCM)等数据库的培训和考证业务,私聊QQ646634621或微信dbaup66,谢谢!