hbase-issues mailing list archives

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

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

Jieshan Bean updated HBASE-5088:
--------------------------------

    Attachment: HBase5088Reproduce.java
                HBase-5088-trunk.patch
                HBase-5088-90.patch

This problem can't be easily reproduced in the cluster. So I just mocked it by write some
test code to reproduce this same concurrency issue. See HBase5088Reproduce.java, it can be
reproduced with a high probability. Change the TreeMap to ConcurrentSkipListMap can solve
the problem.

The patches, I have tested them. All the unit tests passed. In cluster, the performance seems
a slighly coming down:

38764-without patch and 37080-with patch 
                
> 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
>         Attachments: 5088-useMapInterfaces.txt, HBase-5088-90.patch, HBase-5088-trunk.patch,
HBase5088Reproduce.java
>
>
> 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 headMap 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