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

Weiwei Yang commented on HDFS-12463:
------------------------------------

Hi [~linyiqun]

Thanks for the quick response and the patch. Before getting this done, I want 
to make sure I understand the test case, in {{TestXceiverClientMetrics}}, line 
100 to 119, this launches a thread to create 10 write small file requests, then 
sleep 1s, then another 10 requests and so on. In this case, the size of 
{{computeResults}} keeps increasing, but in line 133 to 138, main thread waits 
on all {{computeResults}} finishes ... it seems still have race conditions, 
what if at some point all results are done but then another 10 is added? I 
don't understand why we need to keep adding new requests, could we stop at some 
point? Another minor thing, line 144 seems redundant.

Thanks

> Ozone: Fix TestXceiverClientMetrics#testMetrics 
> ------------------------------------------------
>
>                 Key: HDFS-12463
>                 URL: https://issues.apache.org/jira/browse/HDFS-12463
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: ozone
>    Affects Versions: HDFS-7240
>            Reporter: Weiwei Yang
>            Assignee: Yiqun Lin
>            Priority: Minor
>         Attachments: HDFS-12463-HDFS-7240.001.patch
>
>
> {{TestXceiverClientMetrics#testMetrics}} is failing with following error in 
> recent jenkins job,
> {noformat}
> java.util.ConcurrentModificationException: null
>       at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:901)
>       at java.util.ArrayList$Itr.next(ArrayList.java:851)
>       at 
> org.apache.hadoop.ozone.scm.TestXceiverClientMetrics.lambda$testMetrics$2(TestXceiverClientMetrics.java:134)
> {noformat}
> looks like a non thread safe list caused this race condition in the test case.



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