Skip to content

Commit

Permalink
remove unused codes
Browse files Browse the repository at this point in the history
  • Loading branch information
ariesdevil committed Mar 8, 2022
1 parent d6e4fe2 commit 5d1f1f6
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions query/src/sessions/session_mgr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ use crate::sessions::session_ref::SessionRef;
use crate::sessions::ProcessInfo;
use crate::storages::cache::CacheManager;
use crate::users::auth::auth_mgr::AuthMgr;
use crate::users::RoleCacheMgr;
use crate::users::UserApiProvider;

pub struct SessionManager {
Expand All @@ -54,7 +53,6 @@ pub struct SessionManager {
pub(in crate::sessions) catalog: Arc<DatabaseCatalog>,
pub(in crate::sessions) user_manager: Arc<UserApiProvider>,
pub(in crate::sessions) auth_manager: Arc<AuthMgr>,
pub(in crate::sessions) role_cache_manager: Arc<RoleCacheMgr>,
pub(in crate::sessions) http_query_manager: Arc<HttpQueryManager>,

pub(in crate::sessions) max_sessions: usize,
Expand All @@ -76,15 +74,13 @@ impl SessionManager {
let user = UserApiProvider::create_global(conf.clone()).await?;
let auth_manager = Arc::new(AuthMgr::create(conf.clone(), user.clone()).await?);
let http_query_manager = HttpQueryManager::create_global(conf.clone()).await?;
let role_cache_manager = Arc::new(RoleCacheMgr::new(user.clone()));
let max_sessions = conf.query.max_active_sessions as usize;
let active_sessions = Arc::new(RwLock::new(HashMap::with_capacity(max_sessions)));

Ok(Arc::new(SessionManager {
catalog,
conf,
discovery,
role_cache_manager,
user_manager: user,
http_query_manager,
auth_manager,
Expand Down

0 comments on commit 5d1f1f6

Please sign in to comment.