databend icon indicating copy to clipboard operation
databend copied to clipboard

refactor(session): Remove `SessionRef`

Open ariesdevil opened this issue 2 years ago • 4 comments

I hereby agree to the terms of the CLA available at: https://databend.rs/dev/policies/cla/

Summary

Remove SessionRef for simplify codes.

Fixes #issue

ariesdevil avatar Aug 10 '22 09:08 ariesdevil

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated
databend ⬜️ Ignored (Inspect) Aug 23, 2022 at 11:18AM (UTC)

vercel[bot] avatar Aug 10 '22 09:08 vercel[bot]

 cargo fmt --all -- --check
Diff in /workspace/query/tests/it/tests/context.rs at line 45:
     let dummy_session = sessions.create_session(SessionType::Dummy).await?;
 
     // Set user with all privileges
-    let mut user_info = UserInfo::new(
-        "root",
-        "127.0.0.1",
-        AuthInfo::Password {
-            hash_method: PasswordHashMethod::Sha256,
-            hash_value: Vec::from("pass"),
-        },
-    );
+    let mut user_info = UserInfo::new("root", "127.0.0.1", AuthInfo::Password {
+        hash_method: PasswordHashMethod::Sha256,
+        hash_value: Vec::from("pass"),
+    });
     user_info.grants.grant_privileges(
         &GrantObject::Global,
         UserPrivilegeSet::available_privileges_on_global(),
Diff in /workspace/query/tests/it/tests/context.rs at line 75:
     let sessions = SessionManagerBuilder::create_with_conf(config.clone()).build()?;
     let dummy_session = sessions.create_session(SessionType::Dummy).await?;
 
-    let mut user_info = UserInfo::new(
-        "root",
-        "127.0.0.1",
-        AuthInfo::Password {
-            hash_method: PasswordHashMethod::Sha256,
-            hash_value: Vec::from("pass"),
-        },
-    );
+    let mut user_info = UserInfo::new("root", "127.0.0.1", AuthInfo::Password {
+        hash_method: PasswordHashMethod::Sha256,
+        hash_value: Vec::from("pass"),
+    });

BohuTANG avatar Aug 10 '22 11:08 BohuTANG

Failed to execute. Collected info: Orig exception: The current accept connection has exceeded max_active_sessions config

BohuTANG avatar Aug 10 '22 14:08 BohuTANG

Failed to execute. Collected info: Orig exception: The current accept connection has exceeded max_active_sessions config

I'm working on it

ariesdevil avatar Aug 10 '22 14:08 ariesdevil

destory session should be called in http/clickhouse handlers.

sundy-li avatar Aug 16 '22 02:08 sundy-li

@mergifyio update

ariesdevil avatar Aug 23 '22 11:08 ariesdevil

update

✅ Branch has been successfully updated

mergify[bot] avatar Aug 23 '22 11:08 mergify[bot]