ClickHouse / ClickHouse/ClickHouse

Clickhouse setup keep crash with mutationsFinalizingTask Exception, how to by pass it?

Open
#66,115 3 comments 0 reactions 0 assignees View on GitHub
comp-replication external question
Dominant language
C++
Stars
49.9k
Forks
9k
Avg merge
20h 33m
Merged PRs (30d)
501

Description

### Company or project name

_No response_

### Question

Hi CH crew,
I found that one replica keep crashing during setup, and there are many mutationsFinalizingTask for different tables, event there is only ONE record in system.mutations table? What is the CH setup process, is there any setting to bypass the mutation execution? As we found that one table is no data/part/mutations, but still get the StorageReplicatedMergeTree::mutationsFinalizingTask error. Seems even no mutation, the CH still need to load the mutation, check execution and then update to ZK per each table? Could we optimize it, as the ZK may not stable?

2024.07.04 21:31:13.194521 [ 463 ] {} (0d503ce9-043b-44ae-b305-3143a61d5c7b): void DB::StorageReplicatedMergeTree::mutationsFinalizingTask(): Code: 242. DB::Exception: Table is in readonly mode (replica path: /clickhouse/xxx/xxxx/tables/10/xxx/replicas/xx-xx-xx-10-01719836866). (TABLE_IS_READ_ONLY), Stack trace (when copying this message, always include the lines below):

0. DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x000000000c5c4fbb
1. DB::Exception::Exception(PreformattedMessage&&, int) @ 0x00000000077960ec
2. DB::Exception::Exception(int, FormatStringHelperImpl::type>, String const&) @ 0x00000000077b068b
3. DB::StorageReplicatedMergeTree::assertNotReadonly() const @ 0x00000000113c3921
4. void std::__function::__policy_invoker::__call_impl, String const&, DB::MergeTreeData::MergingParams const&, std::unique_ptr>, DB::RenamingRestrictions, bool)::$_4, void ()>>(std::__function::__policy_storage const*) @ 0x000000001152658c
5. DB::BackgroundSchedulePool::threadFunction() @ 0x000000000f9a7a40
6. void std::__function::__policy_invoker::__call_impl::ThreadFromGlobalPoolImpl, StrongTypedef, char const*)::$_0>(DB::BackgroundSchedulePool::BackgroundSchedulePool(unsigned long, StrongTypedef, StrongTypedef, char const*)::$_0&&)::'lambda'(), void ()>>(std::__function::__policy_storage const*) @ 0x000000000f9a8ae7
7. void* std::__thread_proxy[abi:v15000]>, void ThreadPoolImpl::scheduleImpl(std::function, Priority, std::optional, bool)::'lambda0'()>>(void*) @ 0x000000000c676f83
8. ? @ 0x000072d916a2a609
9. ? @ 0x000072d916945353
(version 24.5.1.1763 (official build))

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.