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

Hudson commented on HBASE-18085:
--------------------------------

FAILURE: Integrated in Jenkins build HBase-Trunk_matrix #3068 (See 
[https://builds.apache.org/job/HBase-Trunk_matrix/3068/])
HBASE-18085 Prevent parallel purge in ObjectPool (liyu: rev 
d047cc9ecc7e0067c3b3aaeeb1600da8d774b211)
* (edit) 
hbase-common/src/main/java/org/apache/hadoop/hbase/util/WeakObjectPool.java
* (edit) 
hbase-common/src/main/java/org/apache/hadoop/hbase/util/SoftObjectPool.java
* (edit) hbase-common/src/main/java/org/apache/hadoop/hbase/util/ObjectPool.java


> Prevent parallel purge in ObjectPool
> ------------------------------------
>
>                 Key: HBASE-18085
>                 URL: https://issues.apache.org/jira/browse/HBASE-18085
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Yu Li
>            Assignee: Yu Li
>             Fix For: 2.0.0
>
>         Attachments: e89l05465.st3.jstack, HBASE-18085.patch, 
> HBASE-18085.patch
>
>
> Parallel purge in ObjectPool is meaningless and will cause contention issue 
> since {{ReferenceQueue#poll}} has synchronization (source code shown below)
> {code}
>     public Reference<? extends T> poll() {
>         if (head == null)
>             return null;
>         synchronized (lock) {
>             return reallyPoll();
>         }
>     }
> {code}
> We observed threads blocking on the purge method while using offheap bucket 
> cache, and we could easily reproduce this by testing the 100% cache hit case 
> in bucket cache with enough reading threads.
> We propose to add a purgeLock and use tryLock to avoid parallel purge.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to