Skip to content

Commit

Permalink
fix: initialize backup system parameter for in memory mode
Browse files Browse the repository at this point in the history
  • Loading branch information
yezizp2012 committed Feb 1, 2024
1 parent 3276239 commit 29e4fb3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/common/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -970,10 +970,13 @@ impl SystemConfig {
// Initialize backup_storage_url and backup_storage_directory if not set.
if let Some(state_store) = &system_params.state_store
&& let Some(data_directory) = &system_params.data_directory
&& let Some(hummock_state_store) = state_store.strip_prefix("hummock+")
{
if system_params.backup_storage_url.is_none() {
system_params.backup_storage_url = Some(hummock_state_store.to_owned());
if let Some(hummock_state_store) = state_store.strip_prefix("hummock+") {
system_params.backup_storage_url = Some(hummock_state_store.to_owned());
} else {
system_params.backup_storage_url = Some("memory".to_string());
}
tracing::info!("initialize backup_storage_url based on state_store");
}
if system_params.backup_storage_directory.is_none() {
Expand Down

0 comments on commit 29e4fb3

Please sign in to comment.