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

Colin Patrick McCabe commented on HDFS-6227:
--------------------------------------------

bq. Can we wrap the following check into a separate method in 
ShortCircuitReplica?

It seems like this would be awkward, since then we couldn't print out which 
stream was closed (block or meta).  Additionally, we only ever do this check 
when we're in {{unref}}, so it would be confusing to add a method like 
"{{isClosed}}".

bq. Let's add a "dfs.close()" at the end of the new unit test 
testPurgingClosedReplicas.

OK

bq. In testPurgingClosedReplicas, we may also want to call "sem.release()" if 
we catch a throwable other than ClosedByInterruptException. It is not necessary 
right now since we know we will catch a ClosedByInterruptException. But in case 
that some new code brings into another type of throwable, the test may get 
blocked for acquiring the semaphore.

OK

> ShortCircuitCache#unref should purge ShortCircuitReplicas whose streams have 
> been closed by java interrupts
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: HDFS-6227
>                 URL: https://issues.apache.org/jira/browse/HDFS-6227
>             Project: Hadoop HDFS
>          Issue Type: Bug
>    Affects Versions: 2.4.0
>            Reporter: Jing Zhao
>            Assignee: Colin Patrick McCabe
>         Attachments: HDFS-6227.000.patch, HDFS-6227.001.patch, 
> ShortCircuitReadInterruption.test.patch
>
>
> While running tests in a single node cluster, where short circuit read is 
> enabled and multiple threads may read the same file concurrently, one of the 
> read got ClosedChannelException and failed. Full exception trace see comment.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to