From 29e4fb35d7378fa33c4dacd335cd871976816232 Mon Sep 17 00:00:00 2001 From: August Date: Thu, 1 Feb 2024 15:43:13 +0800 Subject: [PATCH] fix: initialize backup system parameter for in memory mode --- src/common/src/config.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/common/src/config.rs b/src/common/src/config.rs index f3cd926b6802b..2acdc2323d906 100644 --- a/src/common/src/config.rs +++ b/src/common/src/config.rs @@ -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() {