查询iceberg表导致be宕机

为了更快的定位您的问题,请提供以下信息,谢谢
【详述】iceberg表查询导致be宕机,
【背景】iceberg查询,包含v1\v2的分区和非分区表
【业务影响】
【是否存算分离】是
【StarRocks版本】例如:3.1.8、3.2.3
【集群规模】例如:3fe(1 follower+2observer)+5be(fe与be混部)
【机器信息】CPU虚拟核/内存/网卡,例如:48C/64G/万兆
【联系方式】为了在解决问题过程中能及时联系到您获取一些日志信息,请补充下您的联系方式,例如:社区群1-峻
【附件】
建表
CREATE TABLE glue_catalog.iceberg_db.iceberg_dynamic_test (
id STRING,
yyyymmdd STRING,
type STRING)
USING iceberg
PARTITIONED BY (yyyymmdd)
LOCATION ‘s3://XXX’
TBLPROPERTIES(
‘format’ = ‘iceberg/parquet’,
‘write.format.default’ = ‘parquet’,
‘write.metadata.delete-after-commit.enabled’ = ‘true’,
‘write.metadata.previous-versions-max’ = ‘5’,
‘write.parquet.compression-codec’ = ‘zstd’,
‘format-version’=‘2’);

插入数据
{“id”:“4”,“yyyymmdd”:“2024-01-01”,“type”:“5000”,“age”:“88”,“sex”:“1”}
{“id”:“5”,“yyyymmdd”:“2024-01-01”,“type”:“5555”,“age”:“81”,“sex”:“1”}
{“id”:“6”,“yyyymmdd”:“2024-01-02”,“type”:“3333”,“age”:“13”,“dir”:“1”}
{“id”:“5”,“yyyymmdd”:“2024-01-01”,“type”:“5000”,“age”:“88”,“sex”:“1”}

最新表结构
mysql> show create table iceberg_db.iceberg_dynamic_test\G
*************************** 1. row ***************************
Table: iceberg_dynamic_test
Create Table: CREATE TABLE iceberg_dynamic_test (
id varchar(1048576) DEFAULT NULL,
yyyymmdd varchar(1048576) DEFAULT NULL,
type varchar(1048576) DEFAULT NULL,
age varchar(1048576) DEFAULT NULL,
sex varchar(1048576) DEFAULT NULL,
dir varchar(1048576) DEFAULT NULL
)
PARTITION BY ( yyyymmdd )
PROPERTIES (“location” = “s3://XXX”);
1 row in set (0.16 sec)
查询
select * from iceberg_db.iceberg_dynamic_test limit 10;

报错
fe.warn.log (20.7 KB)

麻烦发下宕机be节点的be.out里的堆栈信息

start time: Mon Feb 26 08:37:24 UTC 2024
3.1.8 RELEASE (build 55c4c35)
query_id:720ec9f7-d483-11ee-a33c-02583ac56eae, fragment_instance:720ec9f7-d483-11ee-a33c-02583ac56eaf
Hive file path: /data/yyyymmdd=2024-01-02/00000-0-1c777e94-e104-4ff3-b5a9-1ec6c1e5434c-00003.parquet, partition id: 19, length: 1537, offset: 4
tracker:process consumption: 20560520
tracker:query_pool consumption: 61600
tracker:load consumption: 0
tracker:metadata consumption: 67883
tracker:tablet_metadata consumption: 61093
tracker:rowset_metadata consumption: 6790
tracker:segment_metadata consumption: 0
tracker:column_metadata consumption: 0
tracker:tablet_schema consumption: 4261
tracker:segment_zonemap consumption: 0
tracker:short_key_index consumption: 0
tracker:column_zonemap_index consumption: 0
tracker:ordinal_index consumption: 0
tracker:bitmap_index consumption: 0
tracker:bloom_filter_index consumption: 0
tracker:compaction consumption: 0
tracker:schema_change consumption: 0
tracker:column_pool consumption: 0
tracker:page_cache consumption: 0
tracker:update consumption: 0
tracker:chunk_allocator consumption: 0
tracker:clone consumption: 0
tracker:consistency consumption: 0
tracker:datacache consumption: 0
tracker:replication consumption: 0
*** Aborted at 1708937151 (unix time) try “date -d @1708937151” if you are using GNU date ***
PC: @ 0x4751f87 starrocks::ChunkHelper::new_chunk()
*** SIGSEGV (@0x50) received by PID 28442 (TID 0x7f711a0b4700) from PID 80; stack trace: ***
@ 0x64dc122 google::(anonymous namespace)::FailureSignalHandler()
@ 0x7f7188483630 (unknown)
@ 0x4751f87 starrocks::ChunkHelper::new_chunk()
@ 0x5983da2 starrocks::parquet::GroupReader::_init_read_chunk()
@ 0x5983f0f starrocks::parquet::GroupReader::init()
@ 0x595b311 starrocks::parquet::FileReader::_init_group_readers()
@ 0x595c0dc starrocks::parquet::FileReader::init()
@ 0x5780789 starrocks::HdfsParquetScanner::do_open()
@ 0x57753c0 starrocks::HdfsScanner::open()
@ 0x56e0975 starrocks::connector::HiveDataSource::_init_scanner()
@ 0x56e29ec starrocks::connector::HiveDataSource::open()
@ 0x2b68291 starrocks::pipeline::ConnectorChunkSource::_open_data_source()
@ 0x2b692f1 starrocks::pipeline::ConnectorChunkSource::_read_chunk()
@ 0x2e30de7 starrocks::pipeline::ChunkSource::buffer_next_batch_chunks_blocking()
@ 0x2b65a9d _ZZN9starrocks8pipeline12ScanOperator18_trigger_next_scanEPNS_12RuntimeStateEiENKUlvE_clEv
@ 0x2b6e521 starrocks::workgroup::ScanExecutor::worker_thread()
@ 0x506b9ea starrocks::ThreadPool::dispatch_thread()
@ 0x506647a starrocks::thread::supervise_thread()
@ 0x7f718847bea5 start_thread
@ 0x7f718787cb0d __clone
@ 0x0 (unknown)

你好,已发,麻烦看一下

这个是FE返回错误,然后BE也宕机了?

@U_1635821686808_1931
你这个iceberg table shcema是不是缺少了age,sex,dir字段?我是手动增加了3个字段才可以insert成功的。还是iceberg支持dynamic field功能?


我在main上面测试是OK的, 我切换到3.2.3看看


MySQL [zya]> select * from iceberg_dynamic_test;
+------+------------+------+------+------+------+
| id   | yyyymmdd   | type | age  | sex  | dir  |
+------+------------+------+------+------+------+
| 4    | 2024-01-01 | 5000 | 88   | 1    | NULL |
| 5    | 2024-01-01 | 5000 | 88   | 1    | NULL |
| 5    | 2024-01-01 | 5555 | 81   | 1    | NULL |
| 6    | 2024-01-02 | 3333 | 13   | NULL | 1    |
+------+------------+------+------+------+------+

老师,需要建一张v2表,可以按主键id更新的

您这个是一张v1表,
我这结果是FE返回错误,然后BE也宕机了

age,sex,dir字段,是我用程序加的,最新表结构是
id varchar(1048576) DEFAULT NULL,
yyyymmdd varchar(1048576) DEFAULT NULL,
type varchar(1048576) DEFAULT NULL,
age varchar(1048576) DEFAULT NULL,
sex varchar(1048576) DEFAULT NULL,
dir varchar(1048576) DEFAULT NULL

我在spark中创建语句是


CREATE TABLE iceberg_dynamic_test (
id STRING,
yyyymmdd STRING,
type STRING,
age string,
sex string,
dir string)
USING iceberg
PARTITIONED BY (yyyymmdd)
TBLPROPERTIES(
'format' = 'iceberg/parquet',
'write.format.default' = 'parquet',
'write.metadata.delete-after-commit.enabled' = 'true',
'write.metadata.previous-versions-max' = '5',
'write.parquet.compression-codec' = 'zstd',
'format-version'='2');



INSERT INTO iceberg_dynamic_test (id, yyyymmdd, type, age, sex, dir) VALUES ('4', '2024-01-01', '5000', '88', '1', NULL);
INSERT INTO iceberg_dynamic_test (id, yyyymmdd, type, age, sex, dir) VALUES ('5', '2024-01-01', '5555', '81', '1', NULL);
INSERT INTO iceberg_dynamic_test (id, yyyymmdd, type, age, sex, dir) VALUES ('6', '2024-01-02', '3333', '13', NULL, '1');
INSERT INTO iceberg_dynamic_test (id, yyyymmdd, type, age, sex, dir) VALUES ('5', '2024-01-01', '5000', '88', '1', NULL);

需要更新一条数据
UPDATE iceberg_dynamic_test SET id=‘5’, yyyymmdd=‘2024-01-01’, type=‘5000’, age=‘88’, sex=‘1’, dir=null WHERE id=‘5’

我复现了这个问题,修复PR在这里 https://github.com/StarRocks/starrocks/pull/41867

另外这个PR https://github.com/StarRocks/starrocks/pull/41854 可以在FE上就禁止了。