ClickHouse / ClickHouse

ClickHouse® is a real-time analytics DBMS
https://clickhouse.com
Apache License 2.0
37.57k stars 6.9k forks source link

min_age_to_force_merge_on_partition_only and ReplacingMergeTree with is_deleted #69165

Open filimonov opened 2 months ago

filimonov commented 2 months ago

when min_age_to_force_merge_on_partition_only merge is happening it's actually safe to remove the rows with is_deleted flag from the target part (i.e. all the rows in partition are combined together, so no ghost rows can reappear if is_deleted for rows will be removed for the newer state - because it's guaranteed there that all parts from the begining of the partition are merged into a one).

canhld94 commented 2 months ago

Looks not difficult to implement, but is is_deleted is still a thing? I thought the feature was removed before.

aadant commented 2 months ago

@canhld94 the feature is not removed. It is tricky to remove deleted rows if the data is not fully merged ... I have seen is_deleted on this recent project https://crypto.clickhouse.com/