[
https://issues.apache.org/jira/browse/HDFS-9103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15007363#comment-15007363
]
Haohui Mai commented on HDFS-9103:
----------------------------------
bq. I'd be happy to change them to use value assignment rather than pointer
assignment to get rid of any risk.
That sounds good to me, but if you can inline the function we can eliminate the
problem at the first place. :-D
bq. I want to make sure I'm getting coverage on the excluded_nodes parameter.
bq. I'd really like to avoid adding traits just for testing just due to the
amount of new/complicated code traits tend to introduce.
Putting the functionality in {{SelectBlockAndNode}} complicates the normal code
path (e.g., the protobuf issue), so preferably let's keep things simple here.
The current tests in bad_datanode_test.cc are sufficient to cover the code. No
new tests are required. Perhaps it is easier to understand why it is covered if
the tests are structured in the following ways:
(1) Testing the {{exclude_node}} rule is properly used. The current test in
{{BadDataNodeTest::RecoverableError/...}} can serve this purpose. The rule
itself can be a gmock to get precise verification.
(2) Testing the functionality of {{BadNodeTracker}}. Currently this is coupled
with {{BadNodeTest}}. It can be simplified and turn them into unit tests. The
tests on testing adding, removing and expiring nodes can focus on the tracker
itself. They do not need to be coupled with the
{{InputStream::SelectBlockAndNode}}.
It should be a small change. That way it should be able to get both sides of
the goods.
> Retry reads on DN failure
> -------------------------
>
> Key: HDFS-9103
> URL: https://issues.apache.org/jira/browse/HDFS-9103
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: hdfs-client
> Reporter: Bob Hansen
> Assignee: James Clampffer
> Fix For: HDFS-8707
>
> Attachments: HDFS-9103.1.patch, HDFS-9103.2.patch,
> HDFS-9103.HDFS-8707.006.patch, HDFS-9103.HDFS-8707.007.patch,
> HDFS-9103.HDFS-8707.008.patch, HDFS-9103.HDFS-8707.009.patch,
> HDFS-9103.HDFS-8707.3.patch, HDFS-9103.HDFS-8707.4.patch,
> HDFS-9103.HDFS-8707.5.patch
>
>
> When AsyncPreadSome fails, add the failed DataNode to the excluded list and
> try again.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)