mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-25 01:10:37 +00:00
feat: sanitize mito config
This commit is contained in:
@@ -46,6 +46,7 @@ const INDEX_CREATE_MEM_THRESHOLD_FACTOR: u64 = 16;
|
||||
pub(crate) const FETCH_OPTION_TIMEOUT: Duration = Duration::from_secs(3);
|
||||
|
||||
/// Configuration for [MitoEngine](crate::engine::MitoEngine).
|
||||
/// Before using the config, make sure to call `MitoConfig::validate()` to check if the config is valid.
|
||||
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq)]
|
||||
#[serde(default)]
|
||||
pub struct MitoConfig {
|
||||
|
||||
@@ -163,11 +163,16 @@ impl SstConverterBuilder {
|
||||
}
|
||||
|
||||
/// Builds a SST converter.
|
||||
pub async fn build(self) -> Result<SstConverter> {
|
||||
pub async fn build(mut self) -> Result<SstConverter> {
|
||||
self.config
|
||||
.sanitize(&self.storage_config.data_home)
|
||||
.context(MitoSnafu)?;
|
||||
|
||||
common_telemetry::info!(
|
||||
"Building SST converter, input_path: {}, storage_config: {:?}",
|
||||
"Building SST converter, input_path: {}, storage_config: {:?}, config: {:?}",
|
||||
self.input_path,
|
||||
self.storage_config
|
||||
self.storage_config,
|
||||
self.config
|
||||
);
|
||||
|
||||
let input_store = new_input_store(&self.input_path).await?;
|
||||
|
||||
Reference in New Issue
Block a user