hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jieshan Bean (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-5088) A concurrency issue on SoftValueSortedMap
Date Thu, 22 Dec 2011 04:25:30 GMT

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

Jieshan Bean commented on HBASE-5088:
-------------------------------------

We found this issue while one thread can't get out of the loop in TreeMap#fixAfterDeletion:
{noformat}
"Thread-923" prio=10 tid=0x00007f3d40553000 nid=0x3ed6 runnable [0x00007f3d05c1a000]
   java.lang.Thread.State: RUNNABLE
	at java.util.TreeMap.fixAfterDeletion(TreeMap.java:2193)
	at java.util.TreeMap.deleteEntry(TreeMap.java:2151)
	at java.util.TreeMap.remove(TreeMap.java:585)
	at java.util.TreeMap$NavigableSubMap.remove(TreeMap.java:1395)
	at org.apache.hadoop.hbase.util.SoftValueSortedMap.get(SoftValueSortedMap.java:101)
	- locked <0x00007f3d94f24f70> (a org.apache.hadoop.hbase.util.SoftValueSortedMap)
	at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getCachedLocation(HConnectionManager.java:846)
	at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegionInMeta(HConnectionManager.java:668)
	at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:594)
	at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:559)
	at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getRegionLocation(HConnectionManager.java:416)
	at org.apache.hadoop.hbase.client.ServerCallable.instantiateServer(ServerCallable.java:57)
	at org.apache.hadoop.hbase.client.ScannerCallable.instantiateServer(ScannerCallable.java:63)
	at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getRegionServerWithRetries(HConnectionManager.java:1018)
	at org.apache.hadoop.hbase.client.HTable$ClientScanner.nextScanner(HTable.java:1104)
	at org.apache.hadoop.hbase.client.HTable$ClientScanner.initialize(HTable.java:1027)
	at org.apache.hadoop.hbase.client.HTable.getScanner(HTable.java:535)
	at com.huawei.icbc.query.SingleTabQuery.querybatch(SingleTabQuery.java:197)
	at com.huawei.icbc.benchmark.SingleTabQueryAction.query(SingleTabQueryAction.java:181)
	at framework.QueryThread.run(QueryThread.java:47)
{noformat}
                
> A concurrency issue on SoftValueSortedMap
> -----------------------------------------
>
>                 Key: HBASE-5088
>                 URL: https://issues.apache.org/jira/browse/HBASE-5088
>             Project: HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.90.4, 0.94.0
>            Reporter: Jieshan Bean
>
> SoftValueSortedMap is backed by a TreeMap. All the methods in this class are synchronized.
If we use this method to add/delete elements, it's ok.
> But in HConnectionManager#getCachedLocation, it use heapMap to get a view from SoftValueSortedMap#internalMap.
Once we operate 
> on this view map(like add/delete) in other threads, a concurrency issue may occur.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message