hbase-issues mailing list archives

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

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

ramkrishna.s.vasudevan commented on HBASE-5088:
-----------------------------------------------

{code}
"WriterThread-2" prio=10 tid=0x00000000405cb000 nid=0x6a98 runnable [0x00007fd0c18cf000]
   java.lang.Thread.State: RUNNABLE
	at org.apache.hadoop.hbase.util.Bytes.compareTo(Bytes.java:916)
	at org.apache.hadoop.hbase.util.Bytes$ByteArrayComparator.compare(Bytes.java:109)
	at org.apache.hadoop.hbase.util.Bytes$ByteArrayComparator.compare(Bytes.java:101)
	at java.util.TreeMap.getEntryUsingComparator(TreeMap.java:351)
	at java.util.TreeMap.getEntry(TreeMap.java:322)
	at java.util.TreeMap.remove(TreeMap.java:580)
	at org.apache.hadoop.hbase.util.SoftValueSortedMap.checkReferences(SoftValueSortedMap.java:76)
	at org.apache.hadoop.hbase.util.SoftValueSortedMap.isEmpty(SoftValueSortedMap.java:150)
	- locked <0x00007fd106cd6870> (a org.apache.hadoop.hbase.util.SoftValueSortedMap)
	at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getCachedLocation(HConnectionManager.java:826)
	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.processBatch(HConnectionManager.java:1133)
	at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.processBatchOfPuts(HConnectionManager.java:1253)
	at org.apache.hadoop.hbase.client.HTable.flushCommits(HTable.java:828)
	at org.apache.hadoop.hbase.client.HTable.doPut(HTable.java:684)
	at org.apache.hadoop.hbase.client.HTable.put(HTable.java:674)
	at PerRegionLoadData$WriterThread.writeBuffer(PerRegionLoadData.java:350)
	at PerRegionLoadData$WriterThread.doRun(PerRegionLoadData.java:314)
{code}
Once we got the above stack trace.. did not dig in much that time.. good finding
                
> 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
>            Assignee: 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