clickhouse Mutations删除操作报错及解决方案

当在ClickHouse执行删除语句后,数据未能清除并出现错误,通过查询system.Mutations表及日志发现问题。根据官方文档,利用KILL MUTATION语法成功终止并解决突变操作问题。
摘要由CSDN通过智能技术生成

1. clickhouse 执行删除语句后查询数据仍旧存在,等待数分钟后依然存在

2. 查询 system.Mutations 表

sql select * from system.mutations whereis_done = 0;发现任务在突变表中状态一直是未执行

3. 查阅 /var/log/clickhouse-server/clickhouse-server.err.log 日志发现如下报错

2021.04.09 10:59:12.971073 [ 6363 ] {
   } <Error> void DB::BackgroundProcessingPool::workLoopFunc(): Code: 393, e.displayText() = DB::Exception: There is no query, Stack trace (when copying this message, always include the lines below):

0. DB::Context::getQueryContext() const @ 0xd87f6ae in /usr/bin/clickhouse
1. DB::InterpreterSelectWithUnionQuery::getSampleBlock(std::__1::shared_ptr<DB::IAST> const&, DB::Context const&) @ 0xdd71271 in /usr/bin/clickhouse
2. ? @ 0xded66ce in /usr/bin/clickhouse
3. DB::getDatabaseAndTablesWithColumns(std::__1::vector<DB::ASTTableExpression const*, std::__1::allocator<DB::ASTTableExpression const*> > const&, DB::Context const&) @ 0xded77c0 in /usr/bin/clickhouse
4. DB::JoinedTables::resolveTables() @ 0xdda3ad4 in /usr/bin/clickhouse
5. DB::InterpreterSelectQuery::InterpreterSelectQuery(std::__1::shared_ptr<DB::IAST> const&, DB::Context const&, std::__1::shared_ptr<DB::IBlockInputStream> const&, std::__1::optional<DB::Pipe>, std::__1::shared_ptr<DB::IStorage> const&, DB::SelectQueryOptions const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >
  • 0
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值