Uploaded image for project: 'Kylin'
  1. Kylin
  2. KYLIN-3578

Do not synchronize on the intrinsic locks of high-level concurrency objects

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • v2.6.0
    • None
    • None

    Description

      From core-common/src/main/java/org/apache/kylin/common/util/MemoryBudgetController.java :

          private final ReentrantLock lock = new ReentrantLock();
      ...
                  synchronized (lock) {
      

      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

      Attachments

        Issue Links

          Activity

            People

              hit_lacus Xiaoxiang Yu
              yuzhihong@gmail.com Ted Yu
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: