mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-26 18:00:41 +00:00
fix(metasrv)!: do not overwrite boolean options unconditionally (#2161)
* fix: do not overwrite boolean options unconditionally Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * fix sqlness start command Signed-off-by: Ruihang Xia <waynestxia@gmail.com> --------- Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
This commit is contained in:
@@ -91,9 +91,9 @@ struct StartCommand {
|
||||
#[clap(short, long)]
|
||||
selector: Option<String>,
|
||||
#[clap(long)]
|
||||
use_memory_store: bool,
|
||||
use_memory_store: Option<bool>,
|
||||
#[clap(long)]
|
||||
disable_region_failover: bool,
|
||||
disable_region_failover: Option<bool>,
|
||||
#[clap(long)]
|
||||
http_addr: Option<String>,
|
||||
#[clap(long)]
|
||||
@@ -136,9 +136,13 @@ impl StartCommand {
|
||||
.context(error::UnsupportedSelectorTypeSnafu { selector_type })?;
|
||||
}
|
||||
|
||||
opts.use_memory_store = self.use_memory_store;
|
||||
if let Some(use_memory_store) = self.use_memory_store {
|
||||
opts.use_memory_store = use_memory_store;
|
||||
}
|
||||
|
||||
opts.disable_region_failover = self.disable_region_failover;
|
||||
if let Some(disable_region_failover) = self.disable_region_failover {
|
||||
opts.disable_region_failover = disable_region_failover;
|
||||
}
|
||||
|
||||
if let Some(http_addr) = &self.http_addr {
|
||||
opts.http_opts.addr = http_addr.clone();
|
||||
|
||||
Reference in New Issue
Block a user