From 5e4ee61c833f7c847294a07b09c0a284998c3414 Mon Sep 17 00:00:00 2001 From: Vladilen Muzychenko Date: Fri, 19 Sep 2025 09:31:48 +0200 Subject: [PATCH] Add new TTL settings --- protos/ydb_table.proto | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/protos/ydb_table.proto b/protos/ydb_table.proto index fdfc79e..c43ecae 100644 --- a/protos/ydb_table.proto +++ b/protos/ydb_table.proto @@ -406,10 +406,32 @@ message ValueSinceUnixEpochModeSettings { uint32 expire_after_seconds = 3; } +message EvictionToExternalStorageSettings { + // Path to external data source + string storage = 1; +} + +message TtlTier { + oneof expression { + DateTypeColumnModeSettings date_type_column = 1; + ValueSinceUnixEpochModeSettings value_since_unix_epoch = 2; + } + + oneof action { + google.protobuf.Empty delete = 3; + EvictionToExternalStorageSettings evict_to_external_storage = 4; + } +} + +message TieredModeSettings { + repeated TtlTier tiers = 1; +} + message TtlSettings { oneof mode { DateTypeColumnModeSettings date_type_column = 1; ValueSinceUnixEpochModeSettings value_since_unix_epoch = 2; + TieredModeSettings tiered_ttl = 4; } // There is no guarantee that expired row will be deleted immediately upon