【已解决】IPV4_CIDR_TO_RANGE有bug,会导致集群崩溃

Viewed 65

example
建表示例如下:

CREATE TABLE ipv4_test (
  `id` int,
  `ip_v4` ipv4
) ENGINE=OLAP
DISTRIBUTED BY HASH(`id`) BUCKETS 4
PROPERTIES (
"replication_allocation" = "tag.location.default: 1"
);

插入数据示例:

insert into ipv4_test values(1, '0.0.0.0');
insert into ipv4_test values(2, '127.0.0.1');
insert into ipv4_test values(3, '59.50.185.152');
insert into ipv4_test values(4, '255.255.255.255');
insert into ipv4_test values(5, '255.255.255.256'); // invalid data
//正常
SELECT ipv4_cidr_to_range(ipv4_string_to_num('192.168.5.2'), 16);
SELECT ipv4_cidr_to_range(to_ipv4('192.168.5.2'), 16);
SELECT ipv4_cidr_to_range(to_ipv4('192.168.5.2'), 16) from ipv4_test;
//be集群cpu飙升并崩溃
SELECT ipv4_cidr_to_range(ip_v4, 16) from ipv4_test;

2 Answers

本地已经复现,会尽快fix,后续会及时反馈进展。