From 16a3257ada2864e8b438fc764e1ddda6ca2bde01 Mon Sep 17 00:00:00 2001 From: Yingwen Date: Tue, 24 Oct 2023 19:24:47 +0800 Subject: [PATCH] fix: add serde default to MitoConfig (#2650) * fix: add serde default to MitoConfig * docs: update config toml --- config/datanode.example.toml | 4 ++++ src/mito2/src/config.rs | 1 + 2 files changed, 5 insertions(+) diff --git a/config/datanode.example.toml b/config/datanode.example.toml index d4058f6e3f..8376b76f68 100644 --- a/config/datanode.example.toml +++ b/config/datanode.example.toml @@ -101,6 +101,10 @@ auto_flush_interval = "1h" global_write_buffer_size = "1GB" # Global write buffer size threshold to reject write requests (default 2G). global_write_buffer_reject_size = "2GB" +# Cache size for SST metadata (default 128MB). Setting it to 0 to disable the cache. +sst_meta_cache_size = "128MB" +# Cache size for vectors and arrow arrays (default 512MB). Setting it to 0 to disable the cache. +vector_cache_size = "512MB" # Log options # [logging] diff --git a/src/mito2/src/config.rs b/src/mito2/src/config.rs index 7cb8d29679..09b33a886b 100644 --- a/src/mito2/src/config.rs +++ b/src/mito2/src/config.rs @@ -28,6 +28,7 @@ const DEFAULT_MAX_BG_JOB: usize = 4; /// Configuration for [MitoEngine](crate::engine::MitoEngine). #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq)] +#[serde(default)] pub struct MitoConfig { // Worker configs: /// Number of region workers (default 1).