From 183fccbbd68e79c553dd28d2d7299162845b19df Mon Sep 17 00:00:00 2001 From: "Lei, HUANG" <6406592+v0y4g3r@users.noreply.github.com> Date: Tue, 9 Apr 2024 10:00:50 +0800 Subject: [PATCH] chore: remove global_ttl config (#3673) * chore: remove global_ttl config * fix: clippy --- config/datanode.example.toml | 2 -- config/standalone.example.toml | 2 -- src/datanode/src/config.rs | 10 ---------- tests-integration/src/test_util.rs | 1 - 4 files changed, 15 deletions(-) diff --git a/config/datanode.example.toml b/config/datanode.example.toml index 2b6eb58354..6d80fd839f 100644 --- a/config/datanode.example.toml +++ b/config/datanode.example.toml @@ -62,8 +62,6 @@ sync_write = false data_home = "/tmp/greptimedb/" # Storage type. type = "File" -# TTL for all tables. Disabled by default. -# global_ttl = "7d" # Cache configuration for object storage such as 'S3' etc. # The local file cache directory diff --git a/config/standalone.example.toml b/config/standalone.example.toml index f654241e17..916e536a82 100644 --- a/config/standalone.example.toml +++ b/config/standalone.example.toml @@ -170,8 +170,6 @@ retry_delay = "500ms" data_home = "/tmp/greptimedb/" # Storage type. type = "File" -# TTL for all tables. Disabled by default. -# global_ttl = "7d" # Cache configuration for object storage such as 'S3' etc. # cache_path = "/path/local_cache" # The local file cache capacity in bytes. diff --git a/src/datanode/src/config.rs b/src/datanode/src/config.rs index eee4004a1a..211f28a508 100644 --- a/src/datanode/src/config.rs +++ b/src/datanode/src/config.rs @@ -14,8 +14,6 @@ //! Datanode configurations -use std::time::Duration; - use common_base::readable_size::ReadableSize; use common_grpc::channel_manager::{ DEFAULT_MAX_GRPC_RECV_MESSAGE_SIZE, DEFAULT_MAX_GRPC_SEND_MESSAGE_SIZE, @@ -65,13 +63,6 @@ impl ObjectStoreConfig { #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(default)] pub struct StorageConfig { - /// Retention period for all tables. - /// - /// Default value is `None`, which means no TTL. - /// - /// The precedence order is: ttl in table options > global ttl. - #[serde(with = "humantime_serde")] - pub global_ttl: Option, /// The working directory of database pub data_home: String, #[serde(flatten)] @@ -82,7 +73,6 @@ pub struct StorageConfig { impl Default for StorageConfig { fn default() -> Self { Self { - global_ttl: None, data_home: DEFAULT_DATA_HOME.to_string(), store: ObjectStoreConfig::default(), providers: vec![], diff --git a/tests-integration/src/test_util.rs b/tests-integration/src/test_util.rs index a584de8bef..1e944afb7d 100644 --- a/tests-integration/src/test_util.rs +++ b/tests-integration/src/test_util.rs @@ -346,7 +346,6 @@ pub(crate) fn create_datanode_opts( data_home: home_dir, providers, store: default_store, - ..Default::default() }, mode, wal: wal_config,