[fix](ctx) manager the lifecycle of connection context (#29346)

In FrontendService, we may create some connection context and set it as a thread local varaible.
These context should be removed from thread local after call.
Otherwise, it may be reused by other thread incorrectly.
This commit is contained in:
Mingyu Chen
2024-01-01 23:32:28 +08:00
committed by GitHub
parent 738abac9ed
commit 4cbbd25d8c
3 changed files with 32 additions and 22 deletions

View File

@ -235,6 +235,8 @@ Status GroupCommitTable::_create_group_commit_load(
request.__set_token("group_commit"); // this is a fake, fe not check it now
request.__set_max_filter_ratio(1.0);
request.__set_strictMode(false);
// this is an internal interface, use admin to pass the auth check
request.__set_user("admin");
if (_exec_env->master_info()->__isset.backend_id) {
request.__set_backend_id(_exec_env->master_info()->backend_id);
} else {