hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jean-Daniel Cryans (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HBASE-2503) PriorityQueue isn't thread safe, KeyValueHeap uses it that way
Date Thu, 06 May 2010 00:46:02 GMT

     [ https://issues.apache.org/jira/browse/HBASE-2503?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jean-Daniel Cryans updated HBASE-2503:
--------------------------------------

    Attachment: HBASE-2503.patch

This patch synchronizes RegionScanner's public methods, removes a close() that wasn't used,
adds a new attribute to check it the scanner was closed and adds a new test to see if we get
the exception. I cannot find an elegant way to test the NPE directly, so I cannot guarantee
that the original issue is fixed but now only 1 thread can access RegionScanner.

> PriorityQueue isn't thread safe, KeyValueHeap uses it that way
> --------------------------------------------------------------
>
>                 Key: HBASE-2503
>                 URL: https://issues.apache.org/jira/browse/HBASE-2503
>             Project: Hadoop HBase
>          Issue Type: Bug
>    Affects Versions: 0.20.3
>            Reporter: Jean-Daniel Cryans
>            Assignee: Jean-Daniel Cryans
>            Priority: Critical
>             Fix For: 0.20.5, 0.21.0
>
>         Attachments: HBASE-2503.patch
>
>
> In the same spirit as HBASE-2077, but a bit different (at least to me). Dave Latham had
the following NPE killing a RS:
> {code}
> Exception in thread "regionserver/192.168.41.2:60020.leaseChecker" java.lang.NullPointerException
>         at org.apache.hadoop.hbase.regionserver.KeyValueHeap$KVScannerComparator.compare(KeyValueHeap.java:127)
>         at org.apache.hadoop.hbase.regionserver.KeyValueHeap$KVScannerComparator.compare(KeyValueHeap.java:117)
>         at java.util.PriorityQueue.siftDownUsingComparator(PriorityQueue.java:644)
>         at java.util.PriorityQueue.siftDown(PriorityQueue.java:612)
>         at java.util.PriorityQueue.poll(PriorityQueue.java:523)
>         at org.apache.hadoop.hbase.regionserver.KeyValueHeap.close(KeyValueHeap.java:151)
>         at org.apache.hadoop.hbase.regionserver.HRegion$RegionScanner.close(HRegion.java:1862)
>         at org.apache.hadoop.hbase.regionserver.HRegionServer$ScannerListener.leaseExpired(HRegionServer.java:1959)
>         at org.apache.hadoop.hbase.Leases.run(Leases.java:98)
> {code}
> He also has the same stack traces from 2077. The PQ javadoc says this class is not thread
safe, but it is used by the leaseChecker thread and the client threads. We need to use something
like the BlockingPriorityQueue instead.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message