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

James Clampffer commented on HDFS-9228:
---------------------------------------

Thanks for the updates!

"The shared_this is to maintain the lifecycle, and the independent this is to 
establish access. That code was failing because we were trying to call 
protected/private members from an external lambda; pushing in this allows 
private access."
That makes a lot more sense now.  I didn't realize capturing 'this' gives 
access to non-public members from the lambda.

The majority of the last patch looks good to me.  Just a few comments:
-needs a couple minor fixes to get rebased to the head
-MakeRetryPolicy could return a unique_ptr to force the caller to take 
ownership.  In reality this probably isn't a big deal and I'm fine with a raw 
pointer.
-The RpcEngine and RpcConnection each have their own state locks and have the 
potential to create a call cycle that deadlocks or have issues with lock 
ordering when contending with other threads.  Could you add some comments about 
what calls are appropriate in what contexts?  I think RpcEngine acquiring a 
lock on RpcConnection is fairly intuitive, but rules for when RpcConnection can 
call methods that acquire the engine_state_lock_ would help avoid a lot of 
future issues.

nits
-Trailing whitespace scattered around.
-In theory lock_held won't always return the correct result during a race.  I 
don't see this being a major issue as long as its primary use is for assertions 
and tests.



> libhdfs++ should respect NN retry configuration settings
> --------------------------------------------------------
>
>                 Key: HDFS-9228
>                 URL: https://issues.apache.org/jira/browse/HDFS-9228
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: hdfs-client
>            Reporter: Bob Hansen
>            Assignee: Bob Hansen
>         Attachments: HDFS-9228.HDFS-8707.001.patch, 
> HDFS-9228.HDFS-8707.002.patch, HDFS-9228.HDFS-8707.003.patch, 
> HDFS-9228.HDFS-8707.004.patch, HDFS-9228.HDFS-8707.005.patch
>
>
> Handle the use case of temporary network or NN hiccups and have a 
> configurable number of retries for NN operations.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to