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

Lei (Eddy) Xu commented on HDFS-10267:
--------------------------------------

[~cmccabe] I have a question for the following code

{code}
 while (!terminateSlowWriter.gotInterruption.get()) {
    // Wait until stopWriterThread attempts to stop our slow writer by sending
    // it an InterruptedException.
   Thread.sleep(1);
}
{code}

Could you help me to understand where does {{stopWriterThread}} interrupt 
{{slowWriterThread}}?  

{code}
try {
          if (sem.tryAcquire(1, remTime, TimeUnit.MILLISECONDS)) {
            return;
          }
        } catch (InterruptedException e) {
          gotInterruption.set(true);
        }
{code}

Should we break the {{while}} loop if the Thread holding this semaphore being 
interrupted?

Thanks.

> Extra "synchronized" on FsDatasetImpl#recoverAppend and 
> FsDatasetImpl#recoverClose
> ----------------------------------------------------------------------------------
>
>                 Key: HDFS-10267
>                 URL: https://issues.apache.org/jira/browse/HDFS-10267
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: datanode
>    Affects Versions: 2.8.0
>            Reporter: Colin Patrick McCabe
>            Assignee: Colin Patrick McCabe
>         Attachments: HDFS-10267.001.patch, HDFS-10267.002.patch, 
> HDFS-10267.003.patch
>
>
> There is an extra "synchronized" on FsDatasetImpl#recoverAppend and 
> FsDatasetImpl#recoverClose that prevents the HDFS-8496 fix from working as 
> intended.  This should be removed.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to