[
https://issues.apache.org/jira/browse/TEZ-2755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14724036#comment-14724036
]
Bikas Saha commented on TEZ-2755:
---------------------------------
There may be weird cases, though, if the actual user client is multi-threaded
and some other thread is performing some operation on TezClient while this one
is stuck on wait for the AM to die? If we dont expect that to happen, then this
patch looks good to me. Else we could probably ignore the warning. We are
anyways stopped. So it should be ok. Or else we would need a stopped flag that
would need to be checked before every public API. Then stop() could set the
stopped flag and then release the lock. Thoughts?
> Fix findbugs warning in TezClient
> ---------------------------------
>
> Key: TEZ-2755
> URL: https://issues.apache.org/jira/browse/TEZ-2755
> Project: Apache Tez
> Issue Type: Bug
> Reporter: Jonathan Eagles
> Assignee: Jonathan Eagles
> Attachments: TEZ-2755.1.patch
>
>
> {code}
> Multithreaded correctness Warnings
> Code Warning
> SWL org.apache.tez.client.TezClient.stop() calls Thread.sleep() with a lock
> held
>
> Bug type SWL_SLEEP_WITH_LOCK_HELD (click for details)
> In class org.apache.tez.client.TezClient
> In method org.apache.tez.client.TezClient.stop()
> At TezClient.java:[line 584]
> Details
> SWL_SLEEP_WITH_LOCK_HELD: Method calls Thread.sleep() with a lock held
> This method calls Thread.sleep() with a lock held. This may result in very
> poor performance and scalability, or a deadlock, since other threads may be
> waiting to acquire the lock. It is a much better idea to call wait() on the
> lock, which releases the lock and allows other threads to run.
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)