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

Chao Sun commented on HDFS-13924:
---------------------------------

Thanks [~xkrogen] for the great comments!

bq. In FSNamesystem#getBlockLocations, I think the new else-if check should be 
guarded by haEnabled && haContext != null, like the one on L1960.

Done.

bq. I don't think ObserverFailedException is the best name for the new 
exception. Can we have something more like ObserverRetriableException or 
ObserverRetryOnActiveException? I think "Failed" is too strong here; it's not 
that the observer failed, just that this particular request needs to be retried.

Done. Changed {{ObserverRetryOnActiveException}}. I think 
{{ObserverRetriableException}} is still a little confusing since it's not just 
retry but also retry directly on active. :)

bq. The test LGTM, but can we also add a new test to 
TestObserverReadProxyProvider ensuring that ObserverFailedException is handled 
appropriately in the face of multiple observers?

Done.

bq. For ObserverReadProxyProvider#unwrapRemoteException(), I don't think the 
type parameter is doing anything useful, and it seems odd to me that a method 
with a name like unwrap... is returning a boolean. I think we should do 
something more like the examples of RetryPolicies#isWrappedStandbyException() 
or RetryPolicies#getWrappedRetriableException().

Thanks for pointing to {{RetryPolicies#isWrappedStandbyException()}}. Given 
that this is only used right now in {{ObserverReadProxyProvider}}, I removed 
the function.

bq. Can we enhance the new INFO log message to include info about which 
observer proxy threw the exception?

Done.

> Handle BlockMissingException when reading from observer
> -------------------------------------------------------
>
>                 Key: HDFS-13924
>                 URL: https://issues.apache.org/jira/browse/HDFS-13924
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Chao Sun
>            Assignee: Chao Sun
>            Priority: Major
>         Attachments: HDFS-13924-HDFS-12943.000.patch, 
> HDFS-13924-HDFS-12943.001.patch, HDFS-13924-HDFS-12943.002.patch
>
>
> Internally we found that reading from ObserverNode may result to 
> {{BlockMissingException}}. This may happen when the observer sees a smaller 
> number of DNs than active (maybe due to communication issue with those DNs), 
> or (we guess) late block reports from some DNs to the observer. This error 
> happens in 
> [DFSInputStream#chooseDataNode|https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSInputStream.java#L846],
>  when no valid DN can be found for the {{LocatedBlock}} got from the NN side.
> One potential solution (although a little hacky) is to ask the 
> {{DFSInputStream}} to retry active when this happens. The retry logic already 
> present in the code - we just have to dynamically set a flag to ask the 
> {{ObserverReadProxyProvider}} try active in this case.
> cc [~shv], [~xkrogen], [~vagarychen], [~zero45] for discussion.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to