koarz commented on code in PR #58515:
URL: https://github.com/apache/doris/pull/58515#discussion_r2579362556
##########
be/src/exec/schema_scanner/schema_partitions_scanner.cpp:
##########
@@ -126,6 +126,9 @@ Status
SchemaPartitionsScanner::get_onedb_info_from_fe(int64_t dbId) {
schema_table_request_params.__set_current_user_ident(*_param->common_param->current_user_ident);
schema_table_request_params.__set_catalog(*_param->common_param->catalog);
schema_table_request_params.__set_dbId(dbId);
+ if (_param->common_param->thread_id > 0) {
Review Comment:
Accessing the SessionVariable requires the ConnectContext. However,
ConnectContext is thread-local. Since the RPC request from the BE creates a new
thread (which does not contain the ConnectContext), we need to retrieve the
correct ConnectContext using the original thread_id.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]