[
https://issues.apache.org/jira/browse/HADOOP-12706?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15097364#comment-15097364
]
Sangjin Lee commented on HADOOP-12706:
--------------------------------------
Thanks for your patch Colin. Yours seems much simpler and has the same
behavior. Let's go with that. I might still preserve the initial System.gc()
call, though... We can also add some logging as we were discussing? I can touch
up the second patch if you're fine with that. Let me know.
Regarding System.gc(), my point was not so much about whether we can avoid
System.gc() in testing this (we can't) as about System.gc() being not very
deterministic. Making this type of tests work across JVMs seems to be somewhat
of an art.
Still, I think this is a test-only issue in that in a live JVM there should be
no cases where a phantom-reachable reference is never enqueued, short of a JVM
bug, given the contract:
{quote}
If the garbage collector determines at a certain point in time that the
referent of a phantom reference is phantom reachable, then at that time or at
some later time it will enqueue the reference.
{quote}
> TestLocalFsFCStatistics#testStatisticsThreadLocalDataCleanUp times out
> occasionally
> -----------------------------------------------------------------------------------
>
> Key: HADOOP-12706
> URL: https://issues.apache.org/jira/browse/HADOOP-12706
> Project: Hadoop Common
> Issue Type: Bug
> Components: test
> Reporter: Jason Lowe
> Assignee: Sangjin Lee
> Attachments: HADOOP-12706.002.patch, HADOOP-12706.01.patch
>
>
> TestLocalFsFCStatistics has been failing sometimes, and when it fails it
> appears to be from FCStatisticsBaseTest.testStatisticsThreadLocalDataCleanUp.
> The test is timing out when it fails.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)