DB::Exception: Part XXXXX intersects previous part YYYYY. It is a bug or a result of manual intervention in the ZooKeeper data.
This article explains how to resolve the DB::Exception error related to intersecting parts in ClickHouse, often caused by a race condition or manual intervention in the ZooKeeper data.
Why it occurs
When this error occurs, a table shows as readonly and the error states intersecting parts.
You can see the error in the logs or by
The error message looks like:
Cause of the Error
This error can be caused by a race condition between mergeSelectingTask
and queue reinitialization.
Solution
Execute the following queries on all replicas:
Then execute the following on all replicas:
Tip
You should upgrade to the latest version of ClickHouse
Additional resources
Related PRs and GitHub issues:
- ClickHouse/ClickHouse#34096
- ClickHouse/ClickHouse#30651
- ClickHouse/ClickHouse#31060
- ClickHouse/ClickHouse#35863
Versions affected:
ClickHouse v 22.12 and prior
· 2 min read