Fix drop partition in rare case#24321
Conversation
|
can you check if 01149_zookeeper_mutation_stuck_after_replace_partition failure is related? |
| // Make sure we cover all parts in partition. In rare cases there might be parts with | ||
| // mutation version greater than current block number. |
There was a problem hiding this comment.
AFAIK, it should never happen due to
ClickHouse/src/Storages/MergeTree/ReplicatedMergeTreeQueue.cpp
Lines 2016 to 2017 in 20b9af7
There was a problem hiding this comment.
Yeah, I fail to construct a minimal reproduceable case for this, but it somehow happens.
Part 20210419_0_5263_999999999 intersects previous part 20210419_0_3820_6_5263. It is a bug.
and
Part 20210218_0_12_999999999_10 intersects previous part 20210218_0_0_0_727
Mutation gets out of sync with the max block number.
However, it seems reasonable to have drop/detach partition to cover all parts, so that this ill-behaved case can be fixed by detach partition and attach partition without data loss.
It's not a bug fix. I'll mark it as improvement.
Cannot reproduce with local unsan build. It doesn't seem to be related though. |
|
Error like As for |
|
ClickHouse special build check - build is ok, but Functional stateless tests (ANTLR debug) - 01155_old_mutation_parts_to_do - Functional stateless tests (release, DatabaseReplicated) - Functional stateless tests flaky check (address) - 01414_mutations_and_errors - Stress test (thread) - Waiting for integration tests |
|
@tavplubix "ClickHouse special build check 4/5 builds" is It is now red in master |
Backport #24321 to 21.4: Fix drop partition in rare case
Backport #24321 to 21.6: Fix drop partition in rare case
Backport #24321 to 21.5: Fix drop partition in rare case
|
21.3 LTS ? |
Backport #24321 to 21.3: Fix drop partition in rare case
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Fix drop partition with intersect fake parts. In rare cases there might be parts with mutation version greater than current block number.
Detailed description / Documentation draft:
.