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

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


The following commit(s) were added to refs/heads/branch-3.0 by this push:
     new 797cf0cfad0 branch-3.0: [fix](regression)Add log for Reach limit of 
connections #45887 (#46820)
797cf0cfad0 is described below

commit 797cf0cfad0dbe2a949b0efa5fda05cd3696c035
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Sat Jan 11 19:33:22 2025 +0800

    branch-3.0: [fix](regression)Add log for Reach limit of connections #45887 
(#46820)
    
    Cherry-picked from #45887
    
    Co-authored-by: James <[email protected]>
---
 fe/fe-core/src/main/java/org/apache/doris/qe/ConnectScheduler.java | 4 ++++
 1 file changed, 4 insertions(+)

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 ec020d07bc3..900285fd194 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
@@ -93,6 +93,8 @@ public class ConnectScheduler {
     // Register one connection with its connection id.
     public boolean registerConnection(ConnectContext ctx) {
         if (numberConnection.incrementAndGet() > maxConnections) {
+            LOG.info("Number connection {} has reach upper limit {}. 
Connection map : [{}]",
+                    numberConnection.get(), maxConnections, connectionMap);
             numberConnection.decrementAndGet();
             return false;
         }
@@ -100,6 +102,8 @@ public class ConnectScheduler {
         connByUser.putIfAbsent(ctx.getQualifiedUser(), new AtomicInteger(0));
         AtomicInteger conns = connByUser.get(ctx.getQualifiedUser());
         if (conns.incrementAndGet() > 
ctx.getEnv().getAuth().getMaxConn(ctx.getQualifiedUser())) {
+            LOG.info("User {}'s connection {} has reached upper limit {}. 
connByUser: [{}]", ctx.getQualifiedUser(),
+                    conns.get(), 
ctx.getEnv().getAuth().getMaxConn(ctx.getQualifiedUser()), connByUser);
             conns.decrementAndGet();
             numberConnection.decrementAndGet();
             return false;


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to