Skip to content

Commit dc2bcdb

Browse files
authored
[Enhancement] Add node info in error msg when connection limit reached (#45445)
Signed-off-by: Dejun Xia <[email protected]>
1 parent 5470bb1 commit dc2bcdb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

fe/fe-core/src/main/java/com/starrocks/qe/ConnectScheduler.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ public boolean submit(ConnectContext context) {
118118
public Pair<Boolean, String> registerConnection(ConnectContext ctx) {
119119
if (numberConnection.get() >= maxConnections.get()) {
120120
return new Pair<>(false, "Reach cluster-wide connection limit, qe_max_connection=" + maxConnections +
121-
", connectionMap.size=" + connectionMap.size());
121+
", connectionMap.size=" + connectionMap.size() +
122+
", node=" + ctx.getGlobalStateMgr().getNodeMgr().getSelfNode());
122123
}
123124
// Check user
124125
connByUser.computeIfAbsent(ctx.getQualifiedUser(), k -> new AtomicInteger(0));
@@ -133,7 +134,8 @@ public Pair<Boolean, String> registerConnection(ConnectContext ctx) {
133134
return new Pair<>(false, "Reach user-level(qualifiedUser: " + ctx.getQualifiedUser() +
134135
", currUserIdentity: " + ctx.getCurrentUserIdentity() + ") connection limit, " +
135136
"currentUserMaxConn=" + currentUserMaxConn + ", connectionMap.size=" + connectionMap.size() +
136-
", connByUser.totConn=" + connByUser.values().stream().mapToInt(AtomicInteger::get).sum());
137+
", connByUser.totConn=" + connByUser.values().stream().mapToInt(AtomicInteger::get).sum() +
138+
", node=" + ctx.getGlobalStateMgr().getNodeMgr().getSelfNode());
137139
}
138140
numberConnection.incrementAndGet();
139141
connByUser.get(ctx.getQualifiedUser()).incrementAndGet();

0 commit comments

Comments
 (0)