Skip to content

Commit

Permalink
Add global log to session settings
Browse files Browse the repository at this point in the history
  • Loading branch information
BohuTANG committed Feb 4, 2022
1 parent e933489 commit 5f2f6d7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions query/src/sessions/session_settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ use common_exception::ErrorCode;
use common_exception::Result;
use common_infallible::RwLock;
use common_meta_types::UserSetting;
use common_tracing::tracing;

use crate::configs::Config;
use crate::sessions::SessionContext;
Expand Down Expand Up @@ -147,11 +148,13 @@ impl Settings {
let global_settings = futures::executor::block_on(
user_api.get_settings(&session_ctx.get_current_tenant()),
)?;
tracing::info!("Get global settings from metasrv:{:?}", global_settings);

for global in &global_settings {
for vx in values.iter_mut() {
// Overwrite setting from metasrv.
if global.name == vx.user_setting.name {
tracing::info!("Over write settings from global setting:{:?}", global);
vx.level = ScopeLevel::Global;
vx.default_value = global.value.clone();
}
Expand Down

0 comments on commit 5f2f6d7

Please sign in to comment.