ClickHouse / ClickHouse/ClickHouse
Concurrent lightweight delete and attach detach partition.
- Dominant language
- C++
- Stars
- 49.9k
- Forks
- 9k
- Avg merge
- 21h 32m
- Merged PRs (30d)
- 515
Description
I have a test for lightweight delete, I perform concurrent lightweight delete in loop and attach, detach partition in loop.
I create MergeTree table, insert data into it, then concurrently:
1. I perform lightweight delete for each partition in loop for some data in each partition(not all the data).
2. I perform attach detach one partition in loop.
Then I check that data deleted in every partition or deleted in every partition except detached
This test can fail in 2 ways:
1. Concurrent detach partition and lightweight delete can cause this exception
```Code: 341. DB::Exception: Received from localhost:9000. DB::Exception: Exception happened during execution of mutation 'mutation_12.txt' with part '6_7_7_0_11' reason: 'Code: 236. DB::Exception: Cancelled mutating parts. (ABORTED) (version 23.3.2.37 (official build))'. This error maybe retryable or not. In case of unretryable error, mutation can be killed with KILL MUTATION query. (UNFINISHED)```.
2. Data in detached partition may disappear completely after attach partition.
Tested on 23.3.2.37-alpine
on 22.8 it works
Manually it is very hard to catch this fails.
Contributor guide
Assessment
This issue has not been assessed yet.