ClickHouse / ClickHouse/ClickHouse
after change storage policy from cold_disk to s3, weird merge
- Dominant language
- C++
- Stars
- 49.9k
- Forks
- 9k
- Avg merge
- 21h 32m
- Merged PRs (30d)
- 515
Description
#### version
22.9.2
#### queation
out old storage policy is hot_to_cold, it store data into disk.
new storage policy is hot_to_cold_s3 it store data into s3.

after change storage policy, there are a lot of weird system.merges:
it read data from cold disk, and then write back to it.

after kill this mutation, the weird merge is closed.

#### create table sql
old :
```
CREATE TABLE default.jaeger_spans_local
(
`timestamp` DateTime('UTC') CODEC(Delta(4), ZSTD(1)),
)
ENGINE = MergeTree
PARTITION BY toDate(timestamp)
ORDER BY (-toUnixTimestamp(timestamp))
TTL timestamp + toIntervalDay(7), timestamp + toIntervalDay(1) TO DISK 'cold_disk'
SETTINGS index_granularity = 1024, storage_policy = 'hot_to_cold'
```
new:
```
CREATE TABLE default.jaeger_spans_local
(
`timestamp` DateTime('UTC') CODEC(Delta(4), ZSTD(1)),
)
ENGINE = MergeTree
PARTITION BY toDate(timestamp)
ORDER BY (-toUnixTimestamp(timestamp))
TTL timestamp + toIntervalDay(7), timestamp + toIntervalDay(1) TO DISK 'cold_disk_s3'
SETTINGS index_granularity = 1024, storage_policy = 'hot_to_cold_s3'
```
Contributor guide
Assessment
This issue has not been assessed yet.