This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-2.1 by this push:
     new 714b90a7fe3 branch-2.1: [fix](arrow-flight-sql) Fix arrow-flight-sql 
ConnectContext to use a unified ID #46284 (#46389)
714b90a7fe3 is described below

commit 714b90a7fe38b15b22f2645bd94b8cd981b864d5
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Sat Jan 4 10:36:09 2025 +0800

    branch-2.1: [fix](arrow-flight-sql) Fix arrow-flight-sql ConnectContext to 
use a unified ID #46284 (#46389)
    
    Cherry-picked from #46284
    
    Co-authored-by: Xinyi Zou <zouxi...@selectdb.com>
---
 fe/fe-core/src/main/java/org/apache/doris/qe/ConnectScheduler.java | 2 +-
 .../arrowflight/sessions/FlightSessionsWithTokenManager.java       | 7 +------
 2 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/ConnectScheduler.java 
b/fe/fe-core/src/main/java/org/apache/doris/qe/ConnectScheduler.java
index 5da6bb1ba95..e4626a0d215 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/qe/ConnectScheduler.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/qe/ConnectScheduler.java
@@ -77,7 +77,7 @@ public class ConnectScheduler {
         }
     }
 
-    // submit one MysqlContext to this scheduler.
+    // submit one MysqlContext or ArrowFlightSqlContext to this scheduler.
     // return true, if this connection has been successfully submitted, 
otherwise return false.
     // Caller should close ConnectContext if return false.
     public boolean submit(ConnectContext context) {
diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/service/arrowflight/sessions/FlightSessionsWithTokenManager.java
 
b/fe/fe-core/src/main/java/org/apache/doris/service/arrowflight/sessions/FlightSessionsWithTokenManager.java
index b7e5ffa4646..75d7ff1b334 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/service/arrowflight/sessions/FlightSessionsWithTokenManager.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/service/arrowflight/sessions/FlightSessionsWithTokenManager.java
@@ -28,17 +28,13 @@ import org.apache.arrow.flight.CallStatus;
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
 
-import java.util.concurrent.atomic.AtomicInteger;
-
 public class FlightSessionsWithTokenManager implements FlightSessionsManager {
     private static final Logger LOG = 
LogManager.getLogger(FlightSessionsWithTokenManager.class);
 
     private final FlightTokenManager flightTokenManager;
-    private final AtomicInteger nextConnectionId;
 
     public FlightSessionsWithTokenManager(FlightTokenManager 
flightTokenManager) {
         this.flightTokenManager = flightTokenManager;
-        this.nextConnectionId = new AtomicInteger(0);
     }
 
     @Override
@@ -69,8 +65,7 @@ public class FlightSessionsWithTokenManager implements 
FlightSessionsManager {
         flightTokenDetails.setCreatedSession(true);
         ConnectContext connectContext = 
FlightSessionsManager.buildConnectContext(peerIdentity,
                 flightTokenDetails.getUserIdentity(), 
flightTokenDetails.getRemoteIp());
-        connectContext.setConnectionId(nextConnectionId.getAndAdd(1));
-        connectContext.resetLoginTime();
+        ExecuteEnv.getInstance().getScheduler().submit(connectContext);
         if 
(!ExecuteEnv.getInstance().getScheduler().registerConnection(connectContext)) {
             String err = "Reach limit of connections, increase 
`qe_max_connection` in fe.conf, or decrease "
                     + "`arrow_flight_token_cache_size` to evict unused bearer 
tokens and it connections faster";


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to