ClickHouse / ClickHouse/ClickHouse
The partition did not migrate as expected with a hot/warm/cold architecture (maybe caused by `move_ttl_info`)
- Dominant language
- C++
- Stars
- 49.9k
- Forks
- 9k
- Avg merge
- 21h 32m
- Merged PRs (30d)
- 515
Description
### Company or project name
_No response_
### Question
clickhouse version:
docker image `docker.io/clickhouse/clickhouse-server:24.12.6.70`
table:
```sql
:) show create table snapshot;
show create table snapshot
┌─statement──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
1. │ CREATE TABLE marketdata.snapshot
(
-- .....
`md_stream_id` LowCardinality(String) DEFAULT '' COMMENT '交易所类别'
)
ENGINE = ReplacingMergeTree
PARTITION BY (trading_day, exchange, tag)
ORDER BY (trading_day, exchange, tag, receive_unix, packet_id)
TTL trading_day TO VOLUME 'default', trading_day + toIntervalDay(120) TO VOLUME 'warm_volume', trading_day + toIntervalDay(240) TO VOLUME 'cold_volume'
SETTINGS index_granularity = 8192, max_parts_in_total = 1000000
COMMENT '快照' │
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
```
```bash
┌─p.database─┬─p.table──┬─partition_id─────────────────────┬─partition─────────────────┬─part_name──────────────────────────────────────────────────┬─current_disk─┬─target_disk─┬─partition_date─┬─less_120day─┬─less_240day─┬────────d120days_ago─┬────────d240days_ago─┐
1. │ marketdata │ order │ b24aaf4d857e2fb44f59580470efb1fe │ ('2025-06-12','SSE','') │ b24aaf4d857e2fb44f59580470efb1fe_415340_422393_3_520621 │ warm_disk │ warm_disk │ 2025-06-12 │ 0 │ 1 │ 2025-07-17 14:26:32 │ 2025-03-19 14:26:32 │
2. │ marketdata │ snapshot │ 4ae44594d6fa4bb9100ece5e6e87f33a │ ('2023-09-12','CFFEX','') │ 4ae44594d6fa4bb9100ece5e6e87f33a_3594528_3605148_2_7207861 │ cold_disk │ default │ 2023-09-12 │ 0 │ 0 │ 2025-07-17 14:26:32 │ 2025-03-19 14:26:32 │
└────────────┴──────────┴──────────────────────────────────┴───────────────────────────┴────────────────────────────────────────────────────────────┴──────────────┴─────────────┴────────────────┴─────────────┴─────────────┴─────────────────────┴─────────────────────┘
```
disk usage
Contributor guide
Assessment
This issue has not been assessed yet.