Skip to content

Commit

Permalink
fix(compatibility): backwards compatibility of session params (#16310)
Browse files Browse the repository at this point in the history
  • Loading branch information
yuhao-su authored Apr 16, 2024
1 parent a3939b0 commit cb0ea41
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/meta/src/manager/session_params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use tracing::info;

use crate::model::{ValTransaction, VarTransaction};
use crate::storage::{MetaStore, MetaStoreRef, Snapshot, Transaction};
use crate::{MetaError, MetaResult};
use crate::MetaResult;

pub type SessionParamsManagerRef = Arc<SessionParamsManager>;

Expand All @@ -48,13 +48,13 @@ impl SessionParamsManager {
let params = if cluster_first_launch {
init_params
} else if let Some(params) =
<SessionConfig as SessionParamsModel>::get(&meta_store, init_params).await?
<SessionConfig as SessionParamsModel>::get(&meta_store, init_params.clone()).await?
{
params
} else {
return Err(MetaError::system_params(
"cluster is not newly created but no session parameters can be found",
));
tracing::warn!("Cluster is not newly created but no session parameters can be found. \
Possibly caused by upgrading from a version where system wide session parameter was not supported");
init_params
};

info!(?params, "session parameters");
Expand Down

0 comments on commit cb0ea41

Please sign in to comment.