From c272d3f3f0a14018c4e4ac9a0c9a42f53e308894 Mon Sep 17 00:00:00 2001 From: Eric Fu Date: Thu, 14 Sep 2023 22:05:01 +0800 Subject: [PATCH] fix: (v1.2) ignore unrecogized/deprecated system params (#12253) Co-authored-by: Noel Kwan <47273164+kwannoel@users.noreply.github.com> --- ci/scripts/regress-test.sh | 1 + src/common/src/system_param/mod.rs | 9 ++++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ci/scripts/regress-test.sh b/ci/scripts/regress-test.sh index e32eb2c9ad666..aa1ba7836dc57 100755 --- a/ci/scripts/regress-test.sh +++ b/ci/scripts/regress-test.sh @@ -30,6 +30,7 @@ mv target/debug/risingwave_regress_test-"$profile" target/debug/risingwave_regre chmod +x ./target/debug/risingwave_regress_test echo "--- Postgres regress test" +apt-get -y update apt-get -y install locales locale-gen C export LANGUAGE=C diff --git a/src/common/src/system_param/mod.rs b/src/common/src/system_param/mod.rs index ccb666367d729..854c0fb44ecb6 100644 --- a/src/common/src/system_param/mod.rs +++ b/src/common/src/system_param/mod.rs @@ -187,10 +187,9 @@ macro_rules! impl_system_params_from_kv { std::str::from_utf8(v.as_ref()).unwrap().to_string() ) }).collect::>(); - Err(format!("unrecognized system params {:?}", unrecognized_params)) - } else { - Ok(ret) + tracing::warn!("unrecognized system params {:?}", unrecognized_params); } + Ok(ret) } }; } @@ -378,8 +377,8 @@ mod tests { let p = PbSystemParams::default(); assert!(system_params_to_kv(&p).is_err()); - // From kv - unrecognized field. - assert!(system_params_from_kv(vec![("?", "?")]).is_err()); + // From kv - unrecognized field should be ignored + assert!(system_params_from_kv(vec![("?", "?")]).is_ok()); // Deser & ser. let p = system_params_from_kv(kvs).unwrap();