Skip to content

Why not remove outdated parts permanently after TTL merge? #16629

@kekekedeng

Description

@kekekedeng

Description


I find some empty parts after background merge. These parts are old enough to be deleted permanently. Why does it still exists?

image

image

Question1: Does it work as expect?


I have read the source code about background merge logic, but not found logic to delete it.

Question2: Can it cause "too many parts" problem?

Maybe, it can exceeds the parts amount limitation max_parts_in_total.

Now, i can avoid this problem by the following two steps:

  • Wait for background merge or trigger merge manually by "OPTIMIZE xxx"
 to ensure that only one part for one outdated partition.
  • Drop outdated partition by "ALTER TABLE table_name DROP PARTITION XXX".

Question3: Why not remote it permanently?

Why not do this? Are there any other considerations?

CH version 19.16.20.1.

Metadata

Metadata

Assignees

Labels

comp-ttlTTL rules and TTL merges (moving/recompressing/rolling-up/deleting parts).obsolete-versionquestionQuestion?

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions