【StarRocks版本】3.1.2-4f3a2ee
【集群规模】3个FE,3个BE,混合部署
【服务器配置】16C,64G内存,500G硬盘,万兆网络,共3台
【联系方式】本站
【问题】由于硬盘原因,有一台服务器上的fe的meta目录和be的storage目录数据丢失了,于是新添加一台服务器,新添加了fe和be节点,接着将有问题的fe和be从系统中DROP掉,DROP掉有问题的fe和be之后,在查询starrocks自带的_statistics_库中的表时出现了如下报错:
mysql> select count(*) from statistics.table_statistic_v1;
ERROR 1064 (HY000): Build Exec OlapScanNode fail, scan info is invalid,10009have no alive replicas
查看了 _statistics_库的table_statistic_v1表、column_statistics表、external_column_statistics表、histogram_statistics表的建表语句,发现这些表默认只有1个副本:
mysql> show create table statistics.table_statistic_v1\G
*************************** 1. row ***************************
Table: table_statistic_v1
Create Table: CREATE TABLE table_statistic_v1
(
table_id
bigint(20) NOT NULL COMMENT “”,
column_name
varchar(65530) NOT NULL COMMENT “”,
db_id
bigint(20) NOT NULL COMMENT “”,
table_name
varchar(65530) NOT NULL COMMENT “”,
db_name
varchar(65530) NOT NULL COMMENT “”,
row_count
bigint(20) NOT NULL COMMENT “”,
data_size
bigint(20) NOT NULL COMMENT “”,
distinct_count
bigint(20) NOT NULL COMMENT “”,
null_count
bigint(20) NOT NULL COMMENT “”,
max
varchar(1048576) NOT NULL COMMENT “”,
min
varchar(1048576) NOT NULL COMMENT “”,
update_time
datetime NOT NULL COMMENT “”
) ENGINE=OLAP
UNIQUE KEY(table_id
, column_name
, db_id
)
DISTRIBUTED BY HASH(table_id
, column_name
, db_id
) BUCKETS 10
PROPERTIES (
“replication_num” = “1”,
“in_memory” = “false”,
“enable_persistent_index” = “false”,
“replicated_storage” = “true”,
“compression” = “LZ4”
);
mysql> show create table statistics.column_statistics\G
*************************** 1. row ***************************
Table: column_statistics
Create Table: CREATE TABLE column_statistics
(
table_id
bigint(20) NOT NULL COMMENT “”,
partition_id
bigint(20) NOT NULL COMMENT “”,
column_name
varchar(65530) NOT NULL COMMENT “”,
db_id
bigint(20) NOT NULL COMMENT “”,
table_name
varchar(65530) NOT NULL COMMENT “”,
partition_name
varchar(65530) NOT NULL COMMENT “”,
row_count
bigint(20) NOT NULL COMMENT “”,
data_size
bigint(20) NOT NULL COMMENT “”,
ndv
hll NOT NULL COMMENT “”,
null_count
bigint(20) NOT NULL COMMENT “”,
max
varchar(1048576) NOT NULL COMMENT “”,
min
varchar(1048576) NOT NULL COMMENT “”,
update_time
datetime NOT NULL COMMENT “”
) ENGINE=OLAP
PRIMARY KEY(table_id
, partition_id
, column_name
)
DISTRIBUTED BY HASH(table_id
, partition_id
, column_name
) BUCKETS 10
PROPERTIES (
“replication_num” = “1”,
“in_memory” = “false”,
“enable_persistent_index” = “false”,
“replicated_storage” = “true”,
“compression” = “LZ4”
);
…
并且本次table_statistic_v1表的数据恰巧在有问题的服务器节点上,由于此服务器节点上的fe/meta目录和be/storage目录的数据丢失了,并且DROP掉了,导致查询table_statistic_v1表数据时出现了上述问题,想请教老师们,这种情况有什么方法可以修复 statistics 库的 table_statistic_v1 表数据吗?或者例如是否可以清理掉已丢失的数据,保留有数据的内容?
技术老师们,这个问题帮忙看一下,在线急等,谢谢