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

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

ZanderXu opened a new pull request, #5086:
URL: https://github.com/apache/hadoop/pull/5086

   ### Description of PR
   [HDFS-16826](https://issues.apache.org/jira/browse/HDFS-16826)
   
   ConnectionManager should advance the client stateId for every request 
whatever `pool` is null or not.
   
   Relate code as bellow:
   ```
   if (pool == null) {
     writeLock.lock();
     try {
       pool = this.pools.get(connectionId);
       if (pool == null) {
         pool = new ConnectionPool(
             this.conf, nnAddress, ugi, this.minSize, this.maxSize,
             this.minActiveRatio, protocol,
             new PoolAlignmentContext(this.routerStateIdContext, nsId));
         this.pools.put(connectionId, pool);
         this.connectionPoolToNamespaceMap.put(connectionId, nsId);
       }
       // BUG Here
       long clientStateId = 
RouterStateIdContext.getClientStateIdFromCurrentCall(nsId);
       pool.getPoolAlignmentContext().advanceClientStateId(clientStateId);
     } finally {
       writeLock.unlock();
     }
   } 
   ```
   




> [RBF SBN] ConnectionManager should advance the client stateId for every 
> request
> -------------------------------------------------------------------------------
>
>                 Key: HDFS-16826
>                 URL: https://issues.apache.org/jira/browse/HDFS-16826
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: ZanderXu
>            Assignee: ZanderXu
>            Priority: Major
>
> ConnectionManager should advance the client stateId for every request 
> whatever pool is null or not.
>  
> Bug Code as bellow:
> {code:java}
> // Create the pool if not created before
> if (pool == null) {
>   writeLock.lock();
>   try {
>     pool = this.pools.get(connectionId);
>     if (pool == null) {
>       pool = new ConnectionPool(
>           this.conf, nnAddress, ugi, this.minSize, this.maxSize,
>           this.minActiveRatio, protocol,
>           new PoolAlignmentContext(this.routerStateIdContext, nsId));
>       this.pools.put(connectionId, pool);
>       this.connectionPoolToNamespaceMap.put(connectionId, nsId);
>     }
>     // BUG Here
>     long clientStateId = 
> RouterStateIdContext.getClientStateIdFromCurrentCall(nsId);
>     pool.getPoolAlignmentContext().advanceClientStateId(clientStateId);
>   } finally {
>     writeLock.unlock();
>   }
> } {code}
>  



--
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