1、查看卡住的DDL的信息
1.1、ncompass datadb 进入数据库客户端命令行 system.mutations 是ck的系统表,用于跟踪表的表更操作(DDL操作)
select * from system.mutations where is_done = 0 order by create_time desc limit 10;
1.2、停止表的DDL变更操作,table和mutation_id,在1.1上面可以看到,
kill mutation where table = tablename;
kill mutation where mutation_id = mutation_id;
示例如下:
kill mutation where table = 'data';
kill mutation where mutation_id = 'mutation_x.txt';
2、找出有问题的分区(借助于ck的错误日志)
2.1、分区删除,alter table tablename drop partition 'partition_name' 示例如下
alter table data drop partition '2022-03-13';