From cad22e7a2dbe16bb04afb8347423751517625de8 Mon Sep 17 00:00:00 2001 From: kellytoole Date: Mon, 18 Nov 2024 15:06:08 -0800 Subject: [PATCH] Documenting MergeTree's ttl_only_drop_parts setting, and updating reference to it. --- .../table-engines/mergetree-family/mergetree.md | 3 +-- docs/en/operations/settings/merge-tree-settings.md | 10 ++++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/docs/en/engines/table-engines/mergetree-family/mergetree.md b/docs/en/engines/table-engines/mergetree-family/mergetree.md index cd2fc69c236..2ca25a044b1 100644 --- a/docs/en/engines/table-engines/mergetree-family/mergetree.md +++ b/docs/en/engines/table-engines/mergetree-family/mergetree.md @@ -684,8 +684,7 @@ If you perform the `SELECT` query between merges, you may get expired data. To a **See Also** -- [ttl_only_drop_parts](/docs/en/operations/settings/settings.md/#ttl_only_drop_parts) setting - +- [ttl_only_drop_parts](/docs/en/operations/settings/merge-tree-settings#ttl_only_drop_parts) setting ## Disk types diff --git a/docs/en/operations/settings/merge-tree-settings.md b/docs/en/operations/settings/merge-tree-settings.md index 45c4cdf9458..c501a72d45d 100644 --- a/docs/en/operations/settings/merge-tree-settings.md +++ b/docs/en/operations/settings/merge-tree-settings.md @@ -78,6 +78,16 @@ If `min_merge_bytes_to_use_direct_io = 0`, then direct I/O is disabled. Default value: `10 * 1024 * 1024 * 1024` bytes. +## ttl_only_drop_parts + +Controls whether data parts are fully dropped in MergeTree tables when all rows in that part have expired according to their `TTL` settings. + +When `ttl_only_drop_parts` is disabled (by default), only the rows that have expired based on their TTL settings are removed. + +When `ttl_only_drop_parts` is enabled, the entire part is dropped if all rows in that part have expired according to their `TTL` settings. + +Default value: 0. + ## merge_with_ttl_timeout Minimum delay in seconds before repeating a merge with delete TTL.