【详述】list 分区表 delete 数据时提示 Failed to execute delete. failed tablet num: 50
【背景】
list 分区表,
使用 时间
+ country
作为分区列,
使用 ifa
hash 分桶,并配置分桶数 20
并设置了 "partition_live_number" = "900",
刚建好的表, 执行删除语句一切正常
当存储了 2 天的数据后(每天一百个国家, 所以里面有 200 个分区)
当执行删除数据语句时, 提示 Failed to execute delete. failed tablet num: 50
以下语句都会有相同的错误提示
DELETE FROM dms.rtb_ml WHERE __d = '20240805';
DELETE FROM dms.rtb_ml WHERE __d = '2024-08-05';
DELETE FROM dms.rtb_ml WHERE __d = '2024-08-05' AND country='IDN'
查看 path: //statistic, 表的 tablet 一切正常. 没有异常的 tablet
此时将表 TRUNCATE
清理数据, 再次执行 delete 语句, 依然报错,
删除表, 重建, 空表下执行 delete 是正常的
【业务影响】
是
【是否存算分离】
是
【StarRocks版本】
3.2.8
【集群规模】
3fe(1 follower+2observer)+ (5 ~ 20) CN 扩缩
【机器信息】
16C/64G/万兆
【联系方式】
StarRocks 3.0-存算分离用户群: 可以自然点嘛
【附件】
表结构
CREATE TABLE `rtb_ml` (
`__d` date NOT NULL COMMENT "",
`ifa` varchar(1048576) NULL COMMENT "",
`media_bundle_array` array<varchar(65533)> NULL COMMENT "",
`make` varchar(1048576) NULL COMMENT "",
`model` varchar(1048576) NULL COMMENT "",
`os_version` varchar(1048576) NULL COMMENT "",
`lang_code` varchar(1048576) NULL COMMENT "",
`region` varchar(1048576) NULL COMMENT "",
`max_rating` decimal(7, 4) NULL COMMENT "",
`min_rating` decimal(7, 4) NULL COMMENT "",
`latest_day` int(11) NULL COMMENT "",
`country` varchar(65533) NOT NULL COMMENT ""
) ENGINE=OLAP
DUPLICATE KEY(`__d`)
COMMENT "OLAP"
PARTITION BY (`__d`,`country`)
DISTRIBUTED BY HASH(`ifa`) BUCKETS 20
PROPERTIES (
"replication_num" = "1",
"datacache.enable" = "false",
"storage_volume" = "builtin_storage_volume",
"enable_async_write_back" = "false",
"enable_persistent_index" = "false",
"partition_live_number" = "900",
"compression" = "LZ4"
);
fe 错误日志
2024-08-06 03:32:50.581Z WARN (thrift-server-pool-4260917|7522369) [StmtExecutor.handleDMLStmtWithProfile():1814] DML statement(/* ApplicationName=DataGrip 2023.3.4 */ DELETE FROM dms.rtb_ml WHERE __d = '20240802' and country = 'BGD') process failed.
com.starrocks.common.DdlException: Failed to execute delete. failed tablet num: 50
at com.starrocks.lake.delete.LakeDeleteJob.run(LakeDeleteJob.java:131) ~[starrocks-fe.jar:?]
at com.starrocks.load.DeleteMgr.process(DeleteMgr.java:214) ~[starrocks-fe.jar:?]
at com.starrocks.qe.StmtExecutor.handleDMLStmt(StmtExecutor.java:1860) ~[starrocks-fe.jar:?]
at com.starrocks.qe.StmtExecutor.handleDMLStmtWithProfile(StmtExecutor.java:1812) ~[starrocks-fe.jar:?]
at com.starrocks.qe.StmtExecutor.execute(StmtExecutor.java:671) ~[starrocks-fe.jar:?]
at com.starrocks.qe.ConnectProcessor.proxyExecute(ConnectProcessor.java:847) ~[starrocks-fe.jar:?]
at com.starrocks.service.FrontendServiceImpl.forward(FrontendServiceImpl.java:1279) ~[starrocks-fe.jar:?]
at com.starrocks.thrift.FrontendService$Processor$forward.getResult(FrontendService.java:4276) ~[starrocks-fe.jar:?]
at com.starrocks.thrift.FrontendService$Processor$forward.getResult(FrontendService.java:4256) ~[starrocks-fe.jar:?]
at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:38) ~[libthrift-0.13.0.jar:0.13.0]
at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:38) ~[libthrift-0.13.0.jar:0.13.0]
at com.starrocks.common.SRTThreadPoolServer$WorkerProcess.run(SRTThreadPoolServer.java:311) ~[starrocks-fe.jar:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
at java.lang.Thread.run(Thread.java:829) ~[?:?]
2024-08-06 03:32:50.581Z INFO (thrift-server-pool-4260917|7522369) [StmtExecutor.execute():721] execute Exception, sql: /* ApplicationName=DataGrip 2023.3.4 */ DELETE FROM dms.rtb_ml WHERE __d = '20240802' and country = 'BGD', error: Failed to execute delete. failed tablet num: 50