Skip to content

Commit

Permalink
fix: the empty default value of intermediate_path
Browse files Browse the repository at this point in the history
  • Loading branch information
zyy17 committed Jun 25, 2024
1 parent 71b4b2e commit 59462b5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
3 changes: 3 additions & 0 deletions src/common/config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ use common_base::readable_size::ReadableSize;
pub use config::*;
use serde::{Deserialize, Serialize};

/// Default data home in file storage.
pub const DEFAULT_DATA_HOME: &str = "/tmp/greptimedb";

pub fn metadata_store_dir(store_dir: &str) -> String {
format!("{store_dir}/metadata")
}
Expand Down
5 changes: 1 addition & 4 deletions src/datanode/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ use servers::Mode;

pub const DEFAULT_OBJECT_STORE_CACHE_SIZE: ReadableSize = ReadableSize::mb(256);

/// Default data home in file storage
const DEFAULT_DATA_HOME: &str = "/tmp/greptimedb";

/// Object storage config
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
#[serde(tag = "type")]
Expand Down Expand Up @@ -72,7 +69,7 @@ pub struct StorageConfig {
impl Default for StorageConfig {
fn default() -> Self {
Self {
data_home: DEFAULT_DATA_HOME.to_string(),
data_home: common_config::DEFAULT_DATA_HOME.to_string(),
store: ObjectStoreConfig::default(),
providers: vec![],
}
Expand Down
2 changes: 1 addition & 1 deletion src/mito2/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ impl Default for InvertedIndexConfig {
apply_on_query: Mode::Auto,
write_buffer_size: ReadableSize::mb(8),
mem_threshold_on_create: Some(ReadableSize::mb(64)),
intermediate_path: String::new(),
intermediate_path: join_dir(common_config::DEFAULT_DATA_HOME, "index_intermediate"),
}
}
}
Expand Down

0 comments on commit 59462b5

Please sign in to comment.