Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-5088

A concurrency issue on SoftValueSortedMap

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 0.90.4, 0.94.0
    • 0.90.6, 0.92.0, 0.94.0
    • Client
    • None
    • Reviewed

    Description

      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.

      Attachments

        1. PerformanceTestResults.png
          28 kB
          Jieshan Bean
        2. HBase5088-trunk-replaceTreeMap.patch
          13 kB
          Jieshan Bean
        3. HBase-5088-trunk.patch
          6 kB
          Jieshan Bean
        4. HBase5088Reproduce.java
          6 kB
          Jieshan Bean
        5. HBase5088-90-replaceTreeMap.patch
          13 kB
          Jieshan Bean
        6. HBase5088-90-replaceSoftValueSortedMap.patch
          5 kB
          Jieshan Bean
        7. HBase-5088-90.patch
          8 kB
          Jieshan Bean
        8. 5088-final3.txt
          12 kB
          Lars Hofhansl
        9. 5088-0.92-trunk-addendum.txt
          3 kB
          Lars Hofhansl
        10. 5088-0.90.txt
          12 kB
          Lars Hofhansl

        Activity

          People

            larsh Lars Hofhansl
            jeason Jieshan Bean
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: