Skip to content

Commit

Permalink
feat!: change config name from kv_store to metadata_store (GreptimeTe…
Browse files Browse the repository at this point in the history
…am#2585)

featchange config name from kv_store to metadata_store

Signed-off-by: Ruihang Xia <[email protected]>
  • Loading branch information
waynexia authored and paomian committed Oct 19, 2023
1 parent 8575eda commit d478a0c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions config/standalone.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ read_batch_size = 128
# Whether to sync log file after every write.
sync_write = false

# Kv options.
[kv_store]
# Metadata storage options.
[metadata_store]
# Kv file size in bytes.
file_size = "256MB"
# Kv purge threshold.
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub const ENV_LIST_SEP: &str = ",";
pub struct MixOptions {
pub data_home: String,
pub procedure: ProcedureConfig,
pub kv_store: KvStoreConfig,
pub metadata_store: KvStoreConfig,
pub frontend: FrontendOptions,
pub datanode: DatanodeOptions,
pub logging: LoggingOptions,
Expand Down
12 changes: 6 additions & 6 deletions src/cmd/src/standalone.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ pub struct StandaloneOptions {
pub prom_store: PromStoreOptions,
pub wal: WalConfig,
pub storage: StorageConfig,
pub kv_store: KvStoreConfig,
pub metadata_store: KvStoreConfig,
pub procedure: ProcedureConfig,
pub logging: LoggingOptions,
/// Options for different store engines.
Expand All @@ -116,7 +116,7 @@ impl Default for StandaloneOptions {
prom_store: PromStoreOptions::default(),
wal: WalConfig::default(),
storage: StorageConfig::default(),
kv_store: KvStoreConfig::default(),
metadata_store: KvStoreConfig::default(),
procedure: ProcedureConfig::default(),
logging: LoggingOptions::default(),
region_engine: vec![
Expand Down Expand Up @@ -277,15 +277,15 @@ impl StartCommand {
if self.influxdb_enable {
opts.influxdb.enable = self.influxdb_enable;
}
let kv_store = opts.kv_store.clone();
let metadata_store = opts.metadata_store.clone();
let procedure = opts.procedure.clone();
let frontend = opts.clone().frontend_options();
let logging = opts.logging.clone();
let datanode = opts.datanode_options();

Ok(Options::Standalone(Box::new(MixOptions {
procedure,
kv_store,
metadata_store,
data_home: datanode.storage.data_home.to_string(),
frontend,
datanode,
Expand Down Expand Up @@ -313,7 +313,7 @@ impl StartCommand {
let metadata_dir = metadata_store_dir(&opts.data_home);
let (kv_store, procedure_manager) = FeInstance::try_build_standalone_components(
metadata_dir,
opts.kv_store,
opts.metadata_store,
opts.procedure,
)
.await
Expand Down Expand Up @@ -614,7 +614,7 @@ mod tests {
assert_eq!(options.influxdb, default_options.influxdb);
assert_eq!(options.prom_store, default_options.prom_store);
assert_eq!(options.wal, default_options.wal);
assert_eq!(options.kv_store, default_options.kv_store);
assert_eq!(options.metadata_store, default_options.metadata_store);
assert_eq!(options.procedure, default_options.procedure);
assert_eq!(options.logging, default_options.logging);
assert_eq!(options.region_engine, default_options.region_engine);
Expand Down

0 comments on commit d478a0c

Please sign in to comment.