Skip to main content

risingwave_common/config/
meta.rs

1// Copyright 2025 RisingWave Labs
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15use risingwave_common_proc_macro::serde_prefix_all;
16use serde::de::Error as _;
17
18use super::*;
19
20#[derive(Copy, Clone, Debug, Default, ValueEnum, Serialize, Deserialize)]
21pub enum MetaBackend {
22    #[default]
23    Mem,
24    Sql, // any database url
25    Sqlite,
26    Postgres,
27    Mysql,
28}
29
30/// Compression algorithm for hummock version checkpoint serialization.
31#[derive(Copy, Clone, Debug, Default, PartialEq, Eq, Serialize, Deserialize)]
32#[serde(rename_all = "lowercase")]
33#[repr(i32)]
34pub enum CheckpointCompression {
35    /// No compression.
36    ///
37    /// NOTE: The numeric values are aligned with protobuf `CheckpointCompressionAlgorithm`.
38    None = 0,
39    /// Zstd compression (default, good balance between ratio and speed).
40    #[default]
41    Zstd = 1,
42    /// Lz4 compression (faster but lower ratio).
43    Lz4 = 2,
44}
45
46#[cfg(test)]
47mod tests {
48    use risingwave_pb::hummock::CheckpointCompressionAlgorithm;
49
50    use super::CheckpointCompression;
51
52    #[test]
53    fn checkpoint_compression_numeric_values_align_with_pb() {
54        assert_eq!(
55            CheckpointCompression::None as i32,
56            CheckpointCompressionAlgorithm::CheckpointCompressionUnspecified as i32
57        );
58        assert_eq!(
59            CheckpointCompression::Zstd as i32,
60            CheckpointCompressionAlgorithm::CheckpointCompressionZstd as i32
61        );
62        assert_eq!(
63            CheckpointCompression::Lz4 as i32,
64            CheckpointCompressionAlgorithm::CheckpointCompressionLz4 as i32
65        );
66    }
67}
68
69#[derive(Copy, Clone, Debug, Default)]
70pub enum DefaultParallelism {
71    #[default]
72    Full,
73    Default(NonZeroUsize),
74}
75
76impl Serialize for DefaultParallelism {
77    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
78    where
79        S: Serializer,
80    {
81        #[derive(Debug, Serialize, Deserialize)]
82        #[serde(untagged)]
83        enum Parallelism {
84            Str(String),
85            Int(usize),
86        }
87        match self {
88            DefaultParallelism::Full => Parallelism::Str("Full".to_owned()).serialize(serializer),
89            DefaultParallelism::Default(val) => {
90                Parallelism::Int(val.get() as _).serialize(serializer)
91            }
92        }
93    }
94}
95
96impl<'de> Deserialize<'de> for DefaultParallelism {
97    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
98    where
99        D: serde::Deserializer<'de>,
100    {
101        #[derive(Debug, Deserialize)]
102        #[serde(untagged)]
103        enum Parallelism {
104            Str(String),
105            Int(usize),
106        }
107        let p = Parallelism::deserialize(deserializer)?;
108        match p {
109            Parallelism::Str(s) => {
110                if s.trim().eq_ignore_ascii_case("full") {
111                    Ok(DefaultParallelism::Full)
112                } else {
113                    Err(serde::de::Error::custom(format!(
114                        "invalid default parallelism: {}",
115                        s
116                    )))
117                }
118            }
119            Parallelism::Int(i) => Ok(DefaultParallelism::Default(
120                // Note: we won't check whether this exceeds the maximum parallelism (i.e., vnode count)
121                // here because it requires extra context. The check will be done when scheduling jobs.
122                NonZeroUsize::new(i).ok_or_else(|| {
123                    serde::de::Error::custom("default parallelism should not be 0")
124                })?,
125            )),
126        }
127    }
128}
129
130/// The section `[meta]` in `risingwave.toml`.
131#[serde_with::apply(Option => #[serde(with = "none_as_empty_string")])]
132#[derive(Clone, Debug, Serialize, Deserialize, DefaultFromSerde, ConfigDoc)]
133pub struct MetaConfig {
134    /// Objects within `min_sst_retention_time_sec` won't be deleted by hummock full GC, even they
135    /// are dangling.
136    #[serde(default = "default::meta::min_sst_retention_time_sec")]
137    pub min_sst_retention_time_sec: u64,
138
139    /// Interval of automatic hummock full GC.
140    #[serde(default = "default::meta::full_gc_interval_sec")]
141    pub full_gc_interval_sec: u64,
142
143    /// Max number of object per full GC job can fetch.
144    #[serde(default = "default::meta::full_gc_object_limit")]
145    pub full_gc_object_limit: u64,
146
147    /// Duration in seconds to retain garbage collection history data.
148    #[serde(default = "default::meta::gc_history_retention_time_sec")]
149    pub gc_history_retention_time_sec: u64,
150
151    /// Max number of inflight time travel query.
152    #[serde(default = "default::meta::max_inflight_time_travel_query")]
153    pub max_inflight_time_travel_query: u64,
154
155    /// Schedule `Dynamic` compaction for all compaction groups with this interval.
156    /// Groups in cooldown (recently found to have no compaction work) are skipped.
157    #[serde(default = "default::meta::periodic_compaction_interval_sec")]
158    pub periodic_compaction_interval_sec: u64,
159
160    /// Interval of invoking a vacuum job, to remove stale metadata from meta store and objects
161    /// from object store.
162    #[serde(default = "default::meta::vacuum_interval_sec")]
163    pub vacuum_interval_sec: u64,
164
165    /// The spin interval inside a vacuum job. It avoids the vacuum job monopolizing resources of
166    /// meta node.
167    #[serde(default = "default::meta::vacuum_spin_interval_ms")]
168    pub vacuum_spin_interval_ms: u64,
169
170    /// Interval of invoking iceberg garbage collection, to expire old snapshots.
171    #[serde(default = "default::meta::iceberg_gc_interval_sec")]
172    pub iceberg_gc_interval_sec: u64,
173
174    /// Maximum time to wait for an iceberg compaction task report before the lease expires.
175    #[serde(default = "default::meta::iceberg_compaction_report_timeout_sec")]
176    pub iceberg_compaction_report_timeout_sec: u64,
177
178    /// Maximum time to reuse cached iceberg compaction schedule config before refreshing it from
179    /// meta catalog.
180    #[serde(default = "default::meta::iceberg_compaction_config_refresh_interval_sec")]
181    pub iceberg_compaction_config_refresh_interval_sec: u64,
182
183    /// Interval of hummock version checkpoint.
184    #[serde(default = "default::meta::hummock_version_checkpoint_interval_sec")]
185    pub hummock_version_checkpoint_interval_sec: u64,
186
187    /// Compression algorithm for hummock version checkpoint.
188    #[serde(default)]
189    pub checkpoint_compression_algorithm: CheckpointCompression,
190
191    /// Chunk size in bytes for reading large checkpoints.
192    /// Large checkpoints are read in parallel chunks to avoid single-request timeout issues.
193    /// Default: 128MB
194    #[serde(default = "default::meta::checkpoint_read_chunk_size")]
195    pub checkpoint_read_chunk_size: usize,
196
197    /// Maximum number of concurrent chunk reads when reading large checkpoints.
198    /// Higher values may improve read throughput but increase memory usage.
199    /// Memory usage = `checkpoint_read_chunk_size` * `checkpoint_read_max_in_flight_chunks`
200    /// Default: 4
201    #[serde(default = "default::meta::checkpoint_read_max_in_flight_chunks")]
202    pub checkpoint_read_max_in_flight_chunks: usize,
203
204    /// If enabled, `SSTable` object file and version delta will be retained.
205    ///
206    /// `SSTable` object file need to be deleted via full GC.
207    ///
208    /// version delta need to be manually deleted.
209    #[serde(default = "default::meta::enable_hummock_data_archive")]
210    pub enable_hummock_data_archive: bool,
211
212    /// The interval at which a Hummock version snapshot is taken for time travel.
213    ///
214    /// Larger value indicates less storage overhead but worse query performance.
215    #[serde(default = "default::meta::hummock_time_travel_snapshot_interval")]
216    pub hummock_time_travel_snapshot_interval: u64,
217
218    /// The minimum delta log number a new checkpoint should compact, otherwise the checkpoint
219    /// attempt is rejected.
220    #[serde(default = "default::meta::min_delta_log_num_for_hummock_version_checkpoint")]
221    pub min_delta_log_num_for_hummock_version_checkpoint: u64,
222
223    /// Maximum allowed heartbeat interval in seconds.
224    #[serde(default = "default::meta::max_heartbeat_interval_sec")]
225    pub max_heartbeat_interval_secs: u32,
226
227    /// Whether to enable fail-on-recovery. Should only be used in e2e tests.
228    #[serde(default)]
229    pub disable_recovery: bool,
230
231    /// Whether to clean up all foreground creating streaming jobs during recovery.
232    ///
233    /// This preserves the legacy recovery behavior. When disabled, only creating jobs whose
234    /// creation progress cannot be recovered are cleaned up.
235    #[serde(default)]
236    pub clean_all_foreground_jobs_on_recovery: bool,
237
238    /// Whether meta should request pausing all data sources on the next bootstrap.
239    /// This allows us to pause the cluster on next bootstrap in an offline way.
240    /// It's important for standalone or single node deployments.
241    /// In those cases, meta node, frontend and compute may all be co-located.
242    /// If the compute node enters an inconsistent state, and continuously crashloops,
243    /// we may not be able to connect to the cluster to run `alter system set pause_on_next_bootstrap = true;`.
244    /// By providing it in the static config, we can have an offline way to trigger the pause on bootstrap.
245    #[serde(default = "default::meta::pause_on_next_bootstrap_offline")]
246    pub pause_on_next_bootstrap_offline: bool,
247
248    /// Whether to disable adaptive-scaling feature.
249    #[serde(default)]
250    pub disable_automatic_parallelism_control: bool,
251
252    /// The number of streaming jobs per scaling operation.
253    #[serde(default = "default::meta::parallelism_control_batch_size")]
254    pub parallelism_control_batch_size: usize,
255
256    /// The period of parallelism control trigger.
257    #[serde(default = "default::meta::parallelism_control_trigger_period_sec")]
258    pub parallelism_control_trigger_period_sec: u64,
259
260    /// The first delay of parallelism control.
261    #[serde(default = "default::meta::parallelism_control_trigger_first_delay_sec")]
262    pub parallelism_control_trigger_first_delay_sec: u64,
263
264    #[serde(default = "default::meta::meta_leader_lease_secs")]
265    pub meta_leader_lease_secs: u64,
266
267    /// After specified seconds of idle (no mview or flush), the process will be exited.
268    /// It is mainly useful for playgrounds.
269    #[serde(default)]
270    pub dangerous_max_idle_secs: Option<u64>,
271
272    /// The default global parallelism for all streaming jobs, if user doesn't specify the
273    /// parallelism, this value will be used. `FULL` means use all available parallelism units,
274    /// otherwise it's a number.
275    #[serde(default = "default::meta::default_parallelism")]
276    pub default_parallelism: DefaultParallelism,
277
278    /// Whether to enable deterministic compaction scheduling, which
279    /// will disable all auto scheduling of compaction tasks.
280    /// Should only be used in e2e tests.
281    #[serde(default)]
282    pub enable_compaction_deterministic: bool,
283
284    /// Enable sanity check when SSTs are committed.
285    #[serde(default)]
286    pub enable_committed_sst_sanity_check: bool,
287
288    #[serde(default = "default::meta::node_num_monitor_interval_sec")]
289    pub node_num_monitor_interval_sec: u64,
290
291    #[serde(default = "default::meta::backend")]
292    pub backend: MetaBackend,
293
294    /// Schedule `space_reclaim` compaction for all compaction groups with this interval.
295    #[serde(default = "default::meta::periodic_space_reclaim_compaction_interval_sec")]
296    pub periodic_space_reclaim_compaction_interval_sec: u64,
297
298    /// Schedule `ttl_reclaim` compaction for all compaction groups with this interval.
299    #[serde(default = "default::meta::periodic_ttl_reclaim_compaction_interval_sec")]
300    pub periodic_ttl_reclaim_compaction_interval_sec: u64,
301
302    #[serde(default = "default::meta::periodic_tombstone_reclaim_compaction_interval_sec")]
303    pub periodic_tombstone_reclaim_compaction_interval_sec: u64,
304
305    #[serde(default = "default::meta::move_table_size_limit")]
306    #[deprecated]
307    pub move_table_size_limit: u64,
308
309    #[serde(default = "default::meta::split_group_size_limit")]
310    #[deprecated]
311    pub split_group_size_limit: u64,
312
313    #[serde(default = "default::meta::cut_table_size_limit")]
314    #[deprecated]
315    pub cut_table_size_limit: u64,
316
317    #[serde(default, flatten)]
318    #[config_doc(omitted)]
319    pub unrecognized: Unrecognized<Self>,
320
321    /// Whether config object storage bucket lifecycle to purge stale data.
322    #[serde(default)]
323    pub do_not_config_object_storage_lifecycle: bool,
324
325    /// Count of partition in split group. Meta will assign this value to every new group when it splits from default-group by automatically.
326    /// Each partition contains aligned data of `vnode_count / partition_vnode_count` consecutive virtual-nodes of one state table.
327    #[serde(default = "default::meta::partition_vnode_count")]
328    pub partition_vnode_count: u32,
329
330    /// The threshold of write throughput to trigger a group split.
331    #[serde(
332        default = "default::meta::table_high_write_throughput_threshold",
333        alias = "table_write_throughput_threshold"
334    )]
335    pub table_high_write_throughput_threshold: u64,
336
337    #[serde(
338        default = "default::meta::table_low_write_throughput_threshold",
339        alias = "min_table_split_write_throughput"
340    )]
341    /// The threshold of write throughput to trigger a group merge.
342    pub table_low_write_throughput_threshold: u64,
343
344    // If the compaction task does not report heartbeat beyond the
345    // `compaction_task_max_heartbeat_interval_secs` interval, we will cancel the task
346    #[serde(default = "default::meta::compaction_task_max_heartbeat_interval_secs")]
347    pub compaction_task_max_heartbeat_interval_secs: u64,
348
349    // If the compaction task does not change in progress beyond the
350    // `compaction_task_max_heartbeat_interval_secs` interval, we will cancel the task
351    #[serde(default = "default::meta::compaction_task_max_progress_interval_secs")]
352    pub compaction_task_max_progress_interval_secs: u64,
353
354    /// The number of compaction task ids to prefetch from the meta store in one batch.
355    #[serde(default = "default::meta::compaction_task_id_refill_capacity")]
356    pub compaction_task_id_refill_capacity: u32,
357
358    #[serde(default)]
359    #[config_doc(nested)]
360    pub compaction_config: CompactionConfig,
361
362    /// Count of partitions of tables in default group and materialized view group.
363    /// The meta node will decide according to some strategy whether to cut the boundaries of the file according to the vnode alignment.
364    /// Each partition contains aligned data of `vnode_count / hybrid_partition_vnode_count` consecutive virtual-nodes of one state table.
365    /// Set it zero to disable this feature.
366    #[serde(default = "default::meta::hybrid_partition_vnode_count")]
367    pub hybrid_partition_vnode_count: u32,
368
369    #[serde(default = "default::meta::event_log_enabled")]
370    pub event_log_enabled: bool,
371    /// Keeps the latest N events per channel.
372    #[serde(default = "default::meta::event_log_channel_max_size")]
373    pub event_log_channel_max_size: u32,
374
375    #[serde(default)]
376    #[config_doc(nested)]
377    pub developer: MetaDeveloperConfig,
378
379    /// Whether compactor should rewrite row to remove dropped column.
380    #[serde(default = "default::meta::enable_dropped_column_reclaim")]
381    pub enable_dropped_column_reclaim: bool,
382
383    /// Whether to split the compaction group when the size of the group exceeds the `compaction_group_config.max_estimated_group_size() * split_group_size_ratio`.
384    #[serde(default = "default::meta::split_group_size_ratio")]
385    pub split_group_size_ratio: f64,
386
387    // During group scheduling, the configured `*_throughput_ratio` is used to determine if the sample exceeds the threshold.
388    // Use `table_stat_throuput_window_seconds_for_*` to check if the split and merge conditions are met.
389    /// To split the compaction group when the high throughput statistics of the group exceeds the threshold.
390    #[serde(default = "default::meta::table_stat_high_write_throughput_ratio_for_split")]
391    pub table_stat_high_write_throughput_ratio_for_split: f64,
392
393    /// To merge the compaction group when the low throughput statistics of the group exceeds the threshold.
394    #[serde(default = "default::meta::table_stat_low_write_throughput_ratio_for_merge")]
395    pub table_stat_low_write_throughput_ratio_for_merge: f64,
396
397    // Hummock also control the size of samples to be judged during group scheduling by `table_stat_sample_size_for_split` and `table_stat_sample_size_for_merge`.
398    // Will use max(table_stat_throuput_window_seconds_for_split /ckpt, table_stat_throuput_window_seconds_for_merge/ckpt) as the global sample size.
399    // For example, if `table_stat_throuput_window_seconds_for_merge` = 240 and `table_stat_throuput_window_seconds_for_split` = 60, and `ckpt_sec = 1`,
400    //  global sample size will be max(240/1, 60/1), then only the last 60 samples will be considered for split, and so on.
401    /// The window seconds of table throughput statistic history for split compaction group.
402    #[serde(default = "default::meta::table_stat_throuput_window_seconds_for_split")]
403    pub table_stat_throuput_window_seconds_for_split: usize,
404
405    /// The window seconds of table throughput statistic history for merge compaction group.
406    #[serde(default = "default::meta::table_stat_throuput_window_seconds_for_merge")]
407    pub table_stat_throuput_window_seconds_for_merge: usize,
408
409    /// The threshold of table size in one compact task to decide whether to partition one table into `hybrid_partition_vnode_count` parts, which belongs to default group and materialized view group.
410    /// Set it max value of 64-bit number to disable this feature.
411    #[serde(default = "default::meta::compact_task_table_size_partition_threshold_low")]
412    pub compact_task_table_size_partition_threshold_low: u64,
413
414    /// The threshold of table size in one compact task to decide whether to partition one table into `partition_vnode_count` parts, which belongs to default group and materialized view group.
415    /// Set it max value of 64-bit number to disable this feature.
416    #[serde(default = "default::meta::compact_task_table_size_partition_threshold_high")]
417    pub compact_task_table_size_partition_threshold_high: u64,
418
419    /// The interval of the regular periodic compaction group split job.
420    /// This does not disable merge-triggered normalize splits when
421    /// `enable_compaction_group_normalize` is enabled.
422    #[serde(
423        default = "default::meta::periodic_scheduling_compaction_group_split_interval_sec",
424        alias = "periodic_split_compact_group_interval_sec"
425    )]
426    pub periodic_scheduling_compaction_group_split_interval_sec: u64,
427
428    /// Whether to normalize overlapping compaction groups before the regular merge scheduling.
429    #[serde(default = "default::meta::enable_compaction_group_normalize")]
430    pub enable_compaction_group_normalize: bool,
431
432    /// The maximum number of normalize splits in one scheduler round. Must be greater than 0.
433    #[serde(
434        default = "default::meta::max_normalize_splits_per_round",
435        deserialize_with = "deserialize_max_normalize_splits_per_round"
436    )]
437    pub max_normalize_splits_per_round: u64,
438
439    /// The interval of the periodic scheduling compaction group merge job.
440    #[serde(default = "default::meta::periodic_scheduling_compaction_group_merge_interval_sec")]
441    pub periodic_scheduling_compaction_group_merge_interval_sec: u64,
442
443    /// The threshold of each dimension of the compaction group after merging. When the dimension * `compaction_group_merge_dimension_threshold` >= limit, the merging job will be rejected.
444    #[serde(default = "default::meta::compaction_group_merge_dimension_threshold")]
445    pub compaction_group_merge_dimension_threshold: f64,
446
447    /// The interval that the CDC table splits initialization should yield to avoid overloading upstream system.
448    #[serde(default = "default::meta::cdc_table_split_init_sleep_interval_splits")]
449    pub cdc_table_split_init_sleep_interval_splits: u64,
450
451    /// The duration that the CDC table splits initialization should yield to avoid overloading upstream system.
452    #[serde(default = "default::meta::cdc_table_split_init_sleep_duration_millis")]
453    pub cdc_table_split_init_sleep_duration_millis: u64,
454
455    /// The batch size that the CDC table splits initialization should use when persisting to meta store.
456    #[serde(default = "default::meta::cdc_table_split_init_insert_batch_size")]
457    pub cdc_table_split_init_insert_batch_size: u64,
458
459    /// Whether to automatically migrate legacy table fragments when meta starts.
460    #[serde(default = "default::meta::enable_legacy_table_migration")]
461    pub enable_legacy_table_migration: bool,
462
463    #[serde(default)]
464    #[config_doc(nested)]
465    pub meta_store_config: MetaStoreConfig,
466}
467
468/// Note: only applies to meta store backends other than `SQLite`.
469#[serde_with::apply(Option => #[serde(with = "none_as_empty_string")])]
470#[derive(Clone, Debug, Serialize, Deserialize, DefaultFromSerde, ConfigDoc)]
471pub struct MetaStoreConfig {
472    /// Maximum number of connections for the meta store connection pool.
473    #[serde(default = "default::meta_store_config::max_connections")]
474    pub max_connections: u32,
475    /// Minimum number of connections for the meta store connection pool.
476    #[serde(default = "default::meta_store_config::min_connections")]
477    pub min_connections: u32,
478    /// Connection timeout in seconds for a meta store connection.
479    #[serde(default = "default::meta_store_config::connection_timeout_sec")]
480    pub connection_timeout_sec: u64,
481    /// Idle timeout in seconds for a meta store connection.
482    #[serde(default = "default::meta_store_config::idle_timeout_sec")]
483    pub idle_timeout_sec: u64,
484    /// Acquire timeout in seconds for a meta store connection.
485    #[serde(default = "default::meta_store_config::acquire_timeout_sec")]
486    pub acquire_timeout_sec: u64,
487}
488
489fn deserialize_max_normalize_splits_per_round<'de, D>(deserializer: D) -> Result<u64, D::Error>
490where
491    D: serde::Deserializer<'de>,
492{
493    let value = u64::deserialize(deserializer)?;
494    if value == 0 {
495        return Err(D::Error::custom(
496            "meta.max_normalize_splits_per_round must be greater than 0",
497        ));
498    }
499    Ok(value)
500}
501
502/// The subsections `[meta.developer]`.
503///
504/// It is put at [`MetaConfig::developer`].
505#[serde_prefix_all("meta_", mode = "alias")]
506#[serde_with::apply(Option => #[serde(with = "none_as_empty_string")])]
507#[derive(Clone, Debug, Serialize, Deserialize, DefaultFromSerde, ConfigDoc)]
508pub struct MetaDeveloperConfig {
509    /// The number of traces to be cached in-memory by the tracing collector
510    /// embedded in the meta node.
511    #[serde(default = "default::developer::meta_cached_traces_num")]
512    pub cached_traces_num: u32,
513
514    /// The maximum memory usage in bytes for the tracing collector embedded
515    /// in the meta node.
516    #[serde(default = "default::developer::meta_cached_traces_memory_limit_bytes")]
517    pub cached_traces_memory_limit_bytes: usize,
518
519    /// Compaction picker config
520    #[serde(default = "default::developer::enable_trivial_move")]
521    pub enable_trivial_move: bool,
522    #[serde(default = "default::developer::enable_check_task_level_overlap")]
523    pub enable_check_task_level_overlap: bool,
524    #[serde(default = "default::developer::max_trivial_move_task_count_per_loop")]
525    pub max_trivial_move_task_count_per_loop: usize,
526
527    #[serde(default = "default::developer::max_get_task_probe_times")]
528    pub max_get_task_probe_times: usize,
529
530    /// Max number of actor allowed per parallelism (default = 100).
531    /// CREATE MV/Table will be noticed when the number of actors exceeds this limit.
532    #[serde(default = "default::developer::actor_cnt_per_worker_parallelism_soft_limit")]
533    pub actor_cnt_per_worker_parallelism_soft_limit: usize,
534
535    /// Max number of actor allowed per parallelism (default = 400).
536    /// CREATE MV/Table will be rejected when the number of actors exceeds this limit.
537    #[serde(default = "default::developer::actor_cnt_per_worker_parallelism_hard_limit")]
538    pub actor_cnt_per_worker_parallelism_hard_limit: usize,
539
540    /// Max number of SSTs fetched from meta store per SELECT, during time travel Hummock version replay.
541    #[serde(default = "default::developer::hummock_time_travel_sst_info_fetch_batch_size")]
542    pub hummock_time_travel_sst_info_fetch_batch_size: usize,
543
544    /// Max number of SSTs inserted into meta store per INSERT, during time travel metadata writing.
545    #[serde(default = "default::developer::hummock_time_travel_sst_info_insert_batch_size")]
546    pub hummock_time_travel_sst_info_insert_batch_size: usize,
547
548    #[serde(default = "default::developer::time_travel_vacuum_interval_sec")]
549    pub time_travel_vacuum_interval_sec: u64,
550
551    #[serde(default = "default::developer::time_travel_vacuum_max_version_count")]
552    pub time_travel_vacuum_max_version_count: Option<u32>,
553
554    /// Max number of epoch-to-version inserted into meta store per INSERT, during time travel metadata writing.
555    #[serde(default = "default::developer::hummock_time_travel_epoch_version_insert_batch_size")]
556    pub hummock_time_travel_epoch_version_insert_batch_size: usize,
557
558    /// Max number of version deltas fetched from meta store per SELECT, during time travel metadata vacuum.
559    #[serde(default = "default::developer::hummock_time_travel_delta_fetch_batch_size")]
560    pub hummock_time_travel_delta_fetch_batch_size: usize,
561
562    #[serde(default = "default::developer::hummock_gc_history_insert_batch_size")]
563    pub hummock_gc_history_insert_batch_size: usize,
564
565    #[serde(default = "default::developer::hummock_time_travel_filter_out_objects_batch_size")]
566    pub hummock_time_travel_filter_out_objects_batch_size: usize,
567
568    #[serde(default = "default::developer::hummock_time_travel_filter_out_objects_v1")]
569    pub hummock_time_travel_filter_out_objects_v1: bool,
570
571    #[serde(
572        default = "default::developer::hummock_time_travel_filter_out_objects_list_version_batch_size"
573    )]
574    pub hummock_time_travel_filter_out_objects_list_version_batch_size: usize,
575
576    #[serde(
577        default = "default::developer::hummock_time_travel_filter_out_objects_list_delta_batch_size"
578    )]
579    pub hummock_time_travel_filter_out_objects_list_delta_batch_size: usize,
580
581    #[serde(default)]
582    pub compute_client_config: RpcClientConfig,
583
584    #[serde(default)]
585    pub stream_client_config: RpcClientConfig,
586
587    #[serde(default)]
588    pub frontend_client_config: RpcClientConfig,
589
590    #[serde(default = "default::developer::table_change_log_insert_batch_size")]
591    pub table_change_log_insert_batch_size: u64,
592
593    #[serde(default = "default::developer::table_change_log_delete_batch_size")]
594    pub table_change_log_delete_batch_size: u64,
595}
596
597#[serde_with::apply(Option => #[serde(with = "none_as_empty_string")])]
598#[derive(Clone, Debug, Serialize, Deserialize, DefaultFromSerde, ConfigDoc)]
599pub struct CompactionConfig {
600    #[serde(default = "default::compaction_config::max_bytes_for_level_base")]
601    pub max_bytes_for_level_base: u64,
602    #[serde(default = "default::compaction_config::max_bytes_for_level_multiplier")]
603    pub max_bytes_for_level_multiplier: u64,
604    #[serde(default = "default::compaction_config::max_compaction_bytes")]
605    pub max_compaction_bytes: u64,
606    #[serde(default = "default::compaction_config::sub_level_max_compaction_bytes")]
607    pub sub_level_max_compaction_bytes: u64,
608    #[serde(default = "default::compaction_config::level0_tier_compact_file_number")]
609    pub level0_tier_compact_file_number: u64,
610    #[serde(default = "default::compaction_config::target_file_size_base")]
611    pub target_file_size_base: u64,
612    #[serde(default = "default::compaction_config::compaction_filter_mask")]
613    pub compaction_filter_mask: u32,
614    #[serde(default = "default::compaction_config::max_sub_compaction")]
615    pub max_sub_compaction: u32,
616    #[serde(default = "default::compaction_config::level0_stop_write_threshold_sub_level_number")]
617    pub level0_stop_write_threshold_sub_level_number: u64,
618    #[serde(default = "default::compaction_config::level0_sub_level_compact_level_count")]
619    pub level0_sub_level_compact_level_count: u32,
620    #[serde(
621        default = "default::compaction_config::level0_overlapping_sub_level_compact_level_count"
622    )]
623    pub level0_overlapping_sub_level_compact_level_count: u32,
624    #[serde(default = "default::compaction_config::max_space_reclaim_bytes")]
625    pub max_space_reclaim_bytes: u64,
626    #[serde(default = "default::compaction_config::level0_max_compact_file_number")]
627    pub level0_max_compact_file_number: u64,
628    #[serde(default = "default::compaction_config::tombstone_reclaim_ratio")]
629    pub tombstone_reclaim_ratio: u32,
630    #[serde(default = "default::compaction_config::enable_emergency_picker")]
631    pub enable_emergency_picker: bool,
632    #[serde(default = "default::compaction_config::max_level")]
633    pub max_level: u32,
634    #[serde(default = "default::compaction_config::sst_allowed_trivial_move_min_size")]
635    pub sst_allowed_trivial_move_min_size: u64,
636    #[serde(default = "default::compaction_config::sst_allowed_trivial_move_max_count")]
637    pub sst_allowed_trivial_move_max_count: u32,
638    #[serde(default = "default::compaction_config::max_l0_compact_level_count")]
639    pub max_l0_compact_level_count: u32,
640    #[serde(default = "default::compaction_config::disable_auto_group_scheduling")]
641    pub disable_auto_group_scheduling: bool,
642    #[serde(default = "default::compaction_config::max_overlapping_level_size")]
643    pub max_overlapping_level_size: u64,
644    #[serde(default = "default::compaction_config::emergency_level0_sst_file_count")]
645    pub emergency_level0_sst_file_count: u32,
646    #[serde(default = "default::compaction_config::emergency_level0_sub_level_partition")]
647    pub emergency_level0_sub_level_partition: u32,
648    #[serde(default = "default::compaction_config::level0_stop_write_threshold_max_sst_count")]
649    pub level0_stop_write_threshold_max_sst_count: u32,
650    #[serde(default = "default::compaction_config::level0_stop_write_threshold_max_size")]
651    pub level0_stop_write_threshold_max_size: u64,
652    #[serde(default = "default::compaction_config::enable_optimize_l0_interval_selection")]
653    pub enable_optimize_l0_interval_selection: bool,
654    /// KV-count threshold for using blocked xor filters when output filter layout is "auto".
655    ///
656    /// When `sstable_filter_layout[level]` is "auto", compaction will build blocked xor filters if
657    /// the estimated key count of one output SST exceeds this threshold. Otherwise it will build a
658    /// single non-blocked xor filter for that output.
659    ///
660    /// This is an output-SST-level heuristic. Older versions compared the threshold with the total
661    /// key count of the whole compaction task, which could classify many small output SSTs as
662    /// blocked only because they came from a large task. With the current heuristic, those outputs
663    /// can be classified back to plain filters.
664    ///
665    /// Note: shared-buffer flush does not read compaction group config, and always uses the
666    /// built-in default threshold.
667    #[serde(default = "default::compaction_config::blocked_xor_filter_kv_count_threshold")]
668    #[serde(alias = "max_kv_count_for_xor16")]
669    pub blocked_xor_filter_kv_count_threshold: Option<u64>,
670    #[serde(default = "default::compaction_config::max_vnode_key_range_bytes")]
671    pub max_vnode_key_range_bytes: Option<u64>,
672    /// Per-level SST filter type for compaction output. Supported values: "none", "xor16", "xor8".
673    ///
674    /// Index by LSM level: `0..=max_level`. Note: L0 (index 0) is currently ignored by shared-buffer
675    /// flush, which always uses "xor16".
676    #[serde(default = "default::compaction_config::sstable_filter_type")]
677    pub sstable_filter_type: Vec<String>,
678    /// Per-level xor filter layout for compaction output.
679    ///
680    /// `auto` uses the kv-count heuristic; `plain` forces non-blocked filters; `blocked`
681    /// forces block-based filters. Explicit `plain` and `blocked` values ignore the kv-count
682    /// threshold. This setting is ignored when the corresponding `sstable_filter_type` is "none".
683    ///
684    /// Index by LSM level: `0..=max_level`. Note: L0 (index 0) is currently ignored by shared-buffer
685    /// flush, which always uses "auto".
686    #[serde(default = "default::compaction_config::sstable_filter_layout")]
687    pub sstable_filter_layout: Vec<String>,
688}
689
690pub mod default {
691    pub use crate::config::default::developer;
692
693    pub mod meta {
694        use crate::config::{DefaultParallelism, MetaBackend};
695
696        pub fn min_sst_retention_time_sec() -> u64 {
697            3600 * 6
698        }
699
700        pub fn gc_history_retention_time_sec() -> u64 {
701            3600 * 6
702        }
703
704        pub fn full_gc_interval_sec() -> u64 {
705            3600
706        }
707
708        pub fn full_gc_object_limit() -> u64 {
709            100_000
710        }
711
712        pub fn max_inflight_time_travel_query() -> u64 {
713            1000
714        }
715
716        pub fn periodic_compaction_interval_sec() -> u64 {
717            300
718        }
719
720        pub fn vacuum_interval_sec() -> u64 {
721            30
722        }
723
724        pub fn vacuum_spin_interval_ms() -> u64 {
725            100
726        }
727
728        pub fn iceberg_gc_interval_sec() -> u64 {
729            3600
730        }
731
732        pub fn iceberg_compaction_report_timeout_sec() -> u64 {
733            30 * 60
734        }
735
736        pub fn iceberg_compaction_config_refresh_interval_sec() -> u64 {
737            60
738        }
739
740        pub fn hummock_version_checkpoint_interval_sec() -> u64 {
741            30
742        }
743
744        pub fn checkpoint_read_chunk_size() -> usize {
745            128 * 1024 * 1024 // 128MB
746        }
747
748        pub fn checkpoint_read_max_in_flight_chunks() -> usize {
749            4
750        }
751
752        pub fn enable_hummock_data_archive() -> bool {
753            false
754        }
755
756        pub fn hummock_time_travel_snapshot_interval() -> u64 {
757            100
758        }
759
760        pub fn min_delta_log_num_for_hummock_version_checkpoint() -> u64 {
761            10
762        }
763
764        pub fn max_heartbeat_interval_sec() -> u32 {
765            60
766        }
767
768        pub fn meta_leader_lease_secs() -> u64 {
769            30
770        }
771
772        pub fn default_parallelism() -> DefaultParallelism {
773            DefaultParallelism::Full
774        }
775
776        pub fn pause_on_next_bootstrap_offline() -> bool {
777            false
778        }
779
780        pub fn node_num_monitor_interval_sec() -> u64 {
781            10
782        }
783
784        pub fn backend() -> MetaBackend {
785            MetaBackend::Mem
786        }
787
788        pub fn periodic_space_reclaim_compaction_interval_sec() -> u64 {
789            3600 // 60min
790        }
791
792        pub fn periodic_ttl_reclaim_compaction_interval_sec() -> u64 {
793            1800 // 30mi
794        }
795
796        pub fn periodic_scheduling_compaction_group_split_interval_sec() -> u64 {
797            10 // 10s
798        }
799
800        pub fn periodic_tombstone_reclaim_compaction_interval_sec() -> u64 {
801            600
802        }
803
804        // limit the size of state table to trigger split by high throughput
805        pub fn move_table_size_limit() -> u64 {
806            10 * 1024 * 1024 * 1024 // 10GB
807        }
808
809        // limit the size of group to trigger split by group_size and avoid too many small groups
810        pub fn split_group_size_limit() -> u64 {
811            64 * 1024 * 1024 * 1024 // 64GB
812        }
813
814        pub fn partition_vnode_count() -> u32 {
815            16
816        }
817
818        pub fn table_high_write_throughput_threshold() -> u64 {
819            16 * 1024 * 1024 // 16MB
820        }
821
822        pub fn table_low_write_throughput_threshold() -> u64 {
823            4 * 1024 * 1024 // 4MB
824        }
825
826        pub fn compaction_task_max_heartbeat_interval_secs() -> u64 {
827            30 // 30s
828        }
829
830        pub fn compaction_task_max_progress_interval_secs() -> u64 {
831            60 * 10 // 10min
832        }
833
834        pub fn compaction_task_id_refill_capacity() -> u32 {
835            64
836        }
837
838        pub fn cut_table_size_limit() -> u64 {
839            1024 * 1024 * 1024 // 1GB
840        }
841
842        pub fn hybrid_partition_vnode_count() -> u32 {
843            4
844        }
845
846        pub fn compact_task_table_size_partition_threshold_low() -> u64 {
847            128 * 1024 * 1024 // 128MB
848        }
849
850        pub fn compact_task_table_size_partition_threshold_high() -> u64 {
851            512 * 1024 * 1024 // 512MB
852        }
853
854        pub fn event_log_enabled() -> bool {
855            true
856        }
857
858        pub fn event_log_channel_max_size() -> u32 {
859            10
860        }
861
862        pub fn parallelism_control_batch_size() -> usize {
863            10
864        }
865
866        pub fn parallelism_control_trigger_period_sec() -> u64 {
867            10
868        }
869
870        pub fn parallelism_control_trigger_first_delay_sec() -> u64 {
871            30
872        }
873
874        pub fn enable_dropped_column_reclaim() -> bool {
875            false
876        }
877
878        pub fn split_group_size_ratio() -> f64 {
879            0.9
880        }
881
882        pub fn table_stat_high_write_throughput_ratio_for_split() -> f64 {
883            0.5
884        }
885
886        pub fn table_stat_low_write_throughput_ratio_for_merge() -> f64 {
887            0.7
888        }
889
890        pub fn table_stat_throuput_window_seconds_for_split() -> usize {
891            60
892        }
893
894        pub fn table_stat_throuput_window_seconds_for_merge() -> usize {
895            240
896        }
897
898        pub fn periodic_scheduling_compaction_group_merge_interval_sec() -> u64 {
899            60 * 10 // 10min
900        }
901
902        pub fn enable_compaction_group_normalize() -> bool {
903            true
904        }
905
906        pub fn max_normalize_splits_per_round() -> u64 {
907            4
908        }
909
910        pub fn compaction_group_merge_dimension_threshold() -> f64 {
911            1.2
912        }
913
914        pub fn cdc_table_split_init_sleep_interval_splits() -> u64 {
915            1000
916        }
917
918        pub fn cdc_table_split_init_sleep_duration_millis() -> u64 {
919            500
920        }
921
922        pub fn cdc_table_split_init_insert_batch_size() -> u64 {
923            100
924        }
925
926        pub fn enable_legacy_table_migration() -> bool {
927            true
928        }
929    }
930
931    pub mod meta_store_config {
932        const DEFAULT_MAX_CONNECTIONS: u32 = 10;
933        const DEFAULT_MIN_CONNECTIONS: u32 = 1;
934        const DEFAULT_CONNECTION_TIMEOUT_SEC: u64 = 10;
935        const DEFAULT_IDLE_TIMEOUT_SEC: u64 = 30;
936        const DEFAULT_ACQUIRE_TIMEOUT_SEC: u64 = 30;
937
938        pub fn max_connections() -> u32 {
939            DEFAULT_MAX_CONNECTIONS
940        }
941
942        pub fn min_connections() -> u32 {
943            DEFAULT_MIN_CONNECTIONS
944        }
945
946        pub fn connection_timeout_sec() -> u64 {
947            DEFAULT_CONNECTION_TIMEOUT_SEC
948        }
949
950        pub fn idle_timeout_sec() -> u64 {
951            DEFAULT_IDLE_TIMEOUT_SEC
952        }
953
954        pub fn acquire_timeout_sec() -> u64 {
955            DEFAULT_ACQUIRE_TIMEOUT_SEC
956        }
957    }
958
959    pub mod compaction_config {
960        const MB: u64 = 1024 * 1024;
961        const GB: u64 = 1024 * 1024 * 1024;
962        const DEFAULT_MAX_COMPACTION_BYTES: u64 = 2 * GB; // 2GB
963        const DEFAULT_MIN_COMPACTION_BYTES: u64 = 128 * MB; // 128MB
964        const DEFAULT_MAX_BYTES_FOR_LEVEL_BASE: u64 = 512 * MB; // 512MB
965
966        // decrease this configure when the generation of checkpoint barrier is not frequent.
967        const DEFAULT_TIER_COMPACT_TRIGGER_NUMBER: u64 = 12;
968        const DEFAULT_TARGET_FILE_SIZE_BASE: u64 = 32 * MB;
969        // 32MB
970        const DEFAULT_MAX_SUB_COMPACTION: u32 = 4;
971        const DEFAULT_LEVEL_MULTIPLIER: u64 = 10;
972        const DEFAULT_MAX_SPACE_RECLAIM_BYTES: u64 = 512 * MB; // 512MB;
973        const DEFAULT_LEVEL0_STOP_WRITE_THRESHOLD_SUB_LEVEL_NUMBER: u64 = 128;
974        const DEFAULT_MAX_COMPACTION_FILE_COUNT: u64 = 100;
975        const DEFAULT_MIN_SUB_LEVEL_COMPACT_LEVEL_COUNT: u32 = 3;
976        const DEFAULT_MIN_OVERLAPPING_SUB_LEVEL_COMPACT_LEVEL_COUNT: u32 = 12;
977        const DEFAULT_TOMBSTONE_RATIO_PERCENT: u32 = 40;
978        const DEFAULT_EMERGENCY_PICKER: bool = true;
979        const DEFAULT_MAX_LEVEL: u32 = 6;
980        const DEFAULT_MAX_L0_COMPACT_LEVEL_COUNT: u32 = 42;
981        const DEFAULT_SST_ALLOWED_TRIVIAL_MOVE_MIN_SIZE: u64 = 4 * MB;
982        const DEFAULT_SST_ALLOWED_TRIVIAL_MOVE_MAX_COUNT: u32 = 256;
983        const DEFAULT_EMERGENCY_LEVEL0_SST_FILE_COUNT: u32 = 2000; // > 50G / 32M = 1600
984        const DEFAULT_EMERGENCY_LEVEL0_SUB_LEVEL_PARTITION: u32 = 256;
985        const DEFAULT_LEVEL0_STOP_WRITE_THRESHOLD_MAX_SST_COUNT: u32 = 5000;
986        const DEFAULT_LEVEL0_STOP_WRITE_THRESHOLD_MAX_SIZE: u64 = 300 * 1024 * MB; // 300GB
987        const DEFAULT_ENABLE_OPTIMIZE_L0_INTERVAL_SELECTION: bool = true;
988        pub const DEFAULT_BLOCKED_XOR_FILTER_KV_COUNT_THRESHOLD: u64 = 256 * 1024;
989        const DEFAULT_MAX_VNODE_KEY_RANGE_BYTES: Option<u64> = None;
990
991        use crate::catalog::hummock::CompactionFilterFlag;
992
993        pub fn max_bytes_for_level_base() -> u64 {
994            DEFAULT_MAX_BYTES_FOR_LEVEL_BASE
995        }
996
997        pub fn max_bytes_for_level_multiplier() -> u64 {
998            DEFAULT_LEVEL_MULTIPLIER
999        }
1000
1001        pub fn max_compaction_bytes() -> u64 {
1002            DEFAULT_MAX_COMPACTION_BYTES
1003        }
1004
1005        pub fn sub_level_max_compaction_bytes() -> u64 {
1006            DEFAULT_MIN_COMPACTION_BYTES
1007        }
1008
1009        pub fn level0_tier_compact_file_number() -> u64 {
1010            DEFAULT_TIER_COMPACT_TRIGGER_NUMBER
1011        }
1012
1013        pub fn target_file_size_base() -> u64 {
1014            DEFAULT_TARGET_FILE_SIZE_BASE
1015        }
1016
1017        pub fn compaction_filter_mask() -> u32 {
1018            (CompactionFilterFlag::STATE_CLEAN | CompactionFilterFlag::TTL).into()
1019        }
1020
1021        pub fn max_sub_compaction() -> u32 {
1022            DEFAULT_MAX_SUB_COMPACTION
1023        }
1024
1025        pub fn level0_stop_write_threshold_sub_level_number() -> u64 {
1026            DEFAULT_LEVEL0_STOP_WRITE_THRESHOLD_SUB_LEVEL_NUMBER
1027        }
1028
1029        pub fn level0_sub_level_compact_level_count() -> u32 {
1030            DEFAULT_MIN_SUB_LEVEL_COMPACT_LEVEL_COUNT
1031        }
1032
1033        pub fn level0_overlapping_sub_level_compact_level_count() -> u32 {
1034            DEFAULT_MIN_OVERLAPPING_SUB_LEVEL_COMPACT_LEVEL_COUNT
1035        }
1036
1037        pub fn max_space_reclaim_bytes() -> u64 {
1038            DEFAULT_MAX_SPACE_RECLAIM_BYTES
1039        }
1040
1041        pub fn level0_max_compact_file_number() -> u64 {
1042            DEFAULT_MAX_COMPACTION_FILE_COUNT
1043        }
1044
1045        pub fn tombstone_reclaim_ratio() -> u32 {
1046            DEFAULT_TOMBSTONE_RATIO_PERCENT
1047        }
1048
1049        pub fn enable_emergency_picker() -> bool {
1050            DEFAULT_EMERGENCY_PICKER
1051        }
1052
1053        pub fn max_level() -> u32 {
1054            DEFAULT_MAX_LEVEL
1055        }
1056
1057        pub fn max_l0_compact_level_count() -> u32 {
1058            DEFAULT_MAX_L0_COMPACT_LEVEL_COUNT
1059        }
1060
1061        pub fn sst_allowed_trivial_move_min_size() -> u64 {
1062            DEFAULT_SST_ALLOWED_TRIVIAL_MOVE_MIN_SIZE
1063        }
1064
1065        pub fn disable_auto_group_scheduling() -> bool {
1066            false
1067        }
1068
1069        pub fn max_overlapping_level_size() -> u64 {
1070            256 * MB
1071        }
1072
1073        pub fn sst_allowed_trivial_move_max_count() -> u32 {
1074            DEFAULT_SST_ALLOWED_TRIVIAL_MOVE_MAX_COUNT
1075        }
1076
1077        pub fn emergency_level0_sst_file_count() -> u32 {
1078            DEFAULT_EMERGENCY_LEVEL0_SST_FILE_COUNT
1079        }
1080
1081        pub fn emergency_level0_sub_level_partition() -> u32 {
1082            DEFAULT_EMERGENCY_LEVEL0_SUB_LEVEL_PARTITION
1083        }
1084
1085        pub fn level0_stop_write_threshold_max_sst_count() -> u32 {
1086            DEFAULT_LEVEL0_STOP_WRITE_THRESHOLD_MAX_SST_COUNT
1087        }
1088
1089        pub fn level0_stop_write_threshold_max_size() -> u64 {
1090            DEFAULT_LEVEL0_STOP_WRITE_THRESHOLD_MAX_SIZE
1091        }
1092
1093        pub fn enable_optimize_l0_interval_selection() -> bool {
1094            DEFAULT_ENABLE_OPTIMIZE_L0_INTERVAL_SELECTION
1095        }
1096
1097        pub fn blocked_xor_filter_kv_count_threshold() -> Option<u64> {
1098            Some(DEFAULT_BLOCKED_XOR_FILTER_KV_COUNT_THRESHOLD)
1099        }
1100
1101        /// Default compression algorithm for a given LSM-tree level.
1102        ///
1103        /// This is the single source of truth used by meta's default compaction config builder
1104        /// and by SQL `ALTER COMPACTION GROUP ... SET compression_algorithm = DEFAULT`.
1105        pub fn compression_algorithm_for_level(level: u32) -> &'static str {
1106            // L0/L1 and L2 do not use compression algorithms.
1107            // L3 - L4 use Lz4, else use Zstd.
1108            match level {
1109                0..=2 => "None",
1110                3 | 4 => "Lz4",
1111                _ => "Zstd",
1112            }
1113        }
1114
1115        /// Default compression algorithm vector for levels `0..=max_level`.
1116        pub fn compression_algorithm_vec(max_level: u32) -> Vec<String> {
1117            (0..=max_level)
1118                .map(|level| compression_algorithm_for_level(level).to_owned())
1119                .collect()
1120        }
1121
1122        pub fn max_vnode_key_range_bytes() -> Option<u64> {
1123            DEFAULT_MAX_VNODE_KEY_RANGE_BYTES
1124        }
1125
1126        pub fn sstable_filter_type() -> Vec<String> {
1127            vec![
1128                "xor16".to_owned(),
1129                "xor16".to_owned(),
1130                "xor16".to_owned(),
1131                "xor16".to_owned(),
1132                "xor16".to_owned(),
1133                "xor8".to_owned(),
1134                "xor8".to_owned(),
1135            ]
1136        }
1137
1138        pub fn sstable_filter_layout() -> Vec<String> {
1139            vec![
1140                "auto".to_owned(),
1141                "blocked".to_owned(),
1142                "blocked".to_owned(),
1143                "blocked".to_owned(),
1144                "blocked".to_owned(),
1145                "blocked".to_owned(),
1146                "blocked".to_owned(),
1147            ]
1148        }
1149    }
1150}