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

Bharat Viswanadham edited comment on HDDS-1830 at 7/23/19 2:10 AM:
-------------------------------------------------------------------

Hi [~smeng]

Thanks for the jstack. I have understood the root cause for this issue. We did 
interrupt, but to come out of wait(), we need to get lock in canFlush(). And 
also stop() is a synchronize method, even if we interrupt, the other thread 
will not be able to come out of that. As the stop() has acquired the lock(as 
this is also synchronized method). That is the reason we are blocked here. I 
think a simple solution is just to remove synchronize from the stop method. I 
have verified that it is working.


was (Author: bharatviswa):
Hi [~smeng]

Thanks for the jstack. I have understood the root cause for this issue. We did 
interrupt, but to come out of wait(), we need to get lock in canFlush(). And 
also stop() is a synchronize method, even if we interrupt, the other thread 
will not be able to come out of that. As the stop() has acquired the lock(as 
this is also synchronized method). I think a simple solution is just to remove 
synchronize from the stop method. I have verified that it is working.

> OzoneManagerDoubleBuffer#stop should wait for daemon thread to die
> ------------------------------------------------------------------
>
>                 Key: HDDS-1830
>                 URL: https://issues.apache.org/jira/browse/HDDS-1830
>             Project: Hadoop Distributed Data Store
>          Issue Type: Sub-task
>            Reporter: Hanisha Koneru
>            Assignee: Siyao Meng
>            Priority: Major
>
> Based on [~arp]'s comment on HDDS-1649, OzoneManagerDoubleBuffer#stop() calls 
> interrupt() on daemon thread but not join(). The thread might still be 
> running when the call returns. 



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

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

Reply via email to