Open UnamedRus opened 5 months ago
Which version do you use? I couldn't reproduce just by corrupting serialization.json
file.
24.3
Unfortunately, i have only screenshot.
it could be about ttl.txt
Not sure about that,
As in that case stack trace should include TTL functions https://github.com/ClickHouse/ClickHouse/blob/bd45a366f7d42bd50dd90283c4992a69894ae674/src/Storages/MergeTree/IMergeTreeDataPart.cpp#L1508
As in that case stack trace should include TTL functions
right,
Anyway, I did 50 different tests and found how to break serialization.json
24.3.2.23
create table x (a Int64, t DateTime) Engine=MergeTree order by a ttl t+interval 1 day as select *,now() from numbers(1e3);
cat /var/lib/clickhouse/data/default/x/all_1_1_0/serialization.json
{"columns":[{"kind":"Default","name":"a","num_defaults":1,"num_rows":1000},{"kind":"Default","name":"t","num_defaults":0,"num_rows":1000}],"version":0}
-- let's cat >>> "version":0} <<<
echo '{"columns":[{"kind":"Default","name":"a","num_defaults":1,"num_rows":1000},{"kind":"Default","name":"t","num_defaults":0,"num_rows":1000}],' > /var/lib/clickhouse/data/default/x/all_1_1_0/serialization.json
systemctl restart clickhouse-server
Job for clickhouse-server.service failed because the control process exited with error code.
See "systemctl status clickhouse-server.service" and "journalctl -xe" for details.
though, it does not reproduce with 24.5.3.5
It seems this is already backported to 24.3
https://github.com/ClickHouse/ClickHouse/pull/69307#issuecomment-2343235909
Describe what's wrong
broken serialization.json can prevent ClickHouse from starting, instead of marking part as broken
https://github.com/ClickHouse/ClickHouse/blob/bd45a366f7d42bd50dd90283c4992a69894ae674/src/Storages/MergeTree/IMergeTreeDataPart.cpp#L1605