Clickhouse: merge_with_ttl_timeout trigger should clean all expired parts

Created on 10 Jun 2020  Â·  5Comments  Â·  Source: ClickHouse/ClickHouse

Describe the bug
Only drop single partition is dropped per merge_with_ttl_timeout period. Other expired partitions stays there.

How to reproduce

  • Version: 20.3.8.53
  • Setting:
    -- ttl_only_drop_parts=1
    -- system.part_log is on
  • create any table partitioned table load data into. Wait for timeout TTL and observe parts changes from system.part_log table.

Expected behavior
It should drop whole expired parts once it checks for TTL.

Additional context
As workaround 'ALTER TABLE events MATERIALIZE TTL' command is run, it triggers to remove parts.

bug comp-ttl

All 5 comments

10128 p.2

It needs to apply TTL to ALL parts of all partitions.
It seems TTL drops only one PART per merge_with_ttl_timeout.

Any update on this?

@jondeandres , this is scheduled for development already. Should be fixed fairly soon. For now just set merge_with_ttl_timeout to some smaller value, like 1800.

Fixed in #12548

Was this page helpful?
0 / 5 - 0 ratings