You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "XiaoXiang Yu (JIRA)" <ji...@apache.org> on 2018/09/24 07:25:00 UTC

[jira] [Commented] (KYLIN-3578) Do not synchronize on the intrinsic locks of high-level concurrency objects

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

XiaoXiang Yu commented on KYLIN-3578:
-------------------------------------

I think I can fix it.

> Do not synchronize on the intrinsic locks of high-level concurrency objects
> ---------------------------------------------------------------------------
>
>                 Key: KYLIN-3578
>                 URL: https://issues.apache.org/jira/browse/KYLIN-3578
>             Project: Kylin
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Priority: Major
>
> From core-common/src/main/java/org/apache/kylin/common/util/MemoryBudgetController.java :
> {code}
>     private final ReentrantLock lock = new ReentrantLock();
> ...
>             synchronized (lock) {
> {code}
> See the following for why such practice is to be avoided:
> https://wiki.sei.cmu.edu/confluence/display/java/LCK03-J.+Do+not+synchronize+on+the+intrinsic+locks+of+high-level+concurrency+objects



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)