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

Xiao Chen commented on HDFS-12603:
----------------------------------

Thanks for sharing the experience Andrew. I think we should have a definitive 
way for the test to pass. I spent quite some time looking at this, but non 
conclusive.

I think the core of the issue is mockito gets confused with multi-threaded mock 
and access. The failure line indicates the {{selectInputStreams}} is the issue, 
so I have tried to:
- inject EditLogTailer to sleep indefinitely. In test code, wait for tailer to 
sleep, then mock, then continue the tailer thread.
- wrap the mock code within NN's writelock
- See if we can use thenReturn or the like, and not use doAnswer. But the test 
looks to me needs exactly doAnswer...

I can spend more time on this in the next few days, but feel free to look at 
this too if you have time.

> Enable async edit logging by default
> ------------------------------------
>
>                 Key: HDFS-12603
>                 URL: https://issues.apache.org/jira/browse/HDFS-12603
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: namenode
>    Affects Versions: 2.8.0, 2.9.0, 3.0.0-alpha1
>            Reporter: Andrew Wang
>            Assignee: Andrew Wang
>         Attachments: HDFS-12603.001.patch, HDFS-12603.002.patch, 
> HDFS-12603.003.patch, HDFS-12603.branch-2.01.patch, 
> HDFS-12603.branch-2.02.patch
>
>
> HDFS-7964 added support for async edit logging. Based on further discussion 
> in that JIRA, we think it's safe to turn this on by default for better 
> out-of-the-box performance.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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

Reply via email to