[ 
https://issues.apache.org/jira/browse/HDFS-17311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17805125#comment-17805125
 ] 

ASF GitHub Bot commented on HDFS-17311:
---------------------------------------

LiuGuH commented on code in PR #6392:
URL: https://github.com/apache/hadoop/pull/6392#discussion_r1440027525


##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/ConnectionManager.java:
##########
@@ -229,7 +229,7 @@ public ConnectionContext getConnection(UserGroupInformation 
ugi,
 
     // Add a new connection to the pool if it wasn't usable
     if (conn == null || !conn.isUsable()) {
-      if (!this.creatorQueue.offer(pool)) {
+      if (!this.creatorQueue.contains(pool) && !this.creatorQueue.offer(pool)) 
{

Review Comment:
   Thanks for review.
   
   Prevents the same pool from being added to the creatorQueue if the pool is 
alread in the creatorQueue.  
   I add a test case for this and update description.  @slfan1989 





> RBF: ConnectionManager creatorQueue should offer a pool that is not already 
> in creatorQueue.
> --------------------------------------------------------------------------------------------
>
>                 Key: HDFS-17311
>                 URL: https://issues.apache.org/jira/browse/HDFS-17311
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>            Reporter: liuguanghua
>            Priority: Major
>              Labels: pull-request-available
>
> 2023-12-29 15:18:54,799 ERROR 
> org.apache.hadoop.hdfs.server.federation.router.ConnectionManager: Cannot add 
> more than 2048 connections at the same time
> In my environment, ConnectionManager creatorQueue is full ,but the cluster 
> does not have so many users cloud reach up  2048 pair of <user,nn> in router.
> In the case of a large number of concurrent  creatorQueue add same pool more 
> than once.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to