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

Fix the concurrent put error of PoolMap

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Abandoned
    • 0.98.0
    • None
    • Client
    • None

    Description

      As 'HBASE-6651' described, there may be risks when invoking
      'HTable.closeTablePool' and 'HTable.getTable' concurrently because PoolMap is not thread safe. The updates have not been committed to trunk. Among these concurrent risks, I think it may be more serious to invoke 'HTable.getTable' concurrently, which describes as "For example PoolMap.put() calles ConcurrentMap.get() and calles ConcurrentMap.put(). If other threads add a new instance to the concurent map in the middle of the calls, the new instance might be dropped." in 'HBASE-6651'. Applications tend to invoke 'HTable.getTable' concurrently in multi-thread environments, if 'autoFlush' of HTable is set to false and HTable is dropped because the concurrently invoking HTable.getTable, the written data buffered in dropped HTable can't be sent to region servers. I think this problem is more serious, can we fix this before 'HBASE-6651' committing to trunk? I update the 'put' method of PooledMap to avoid this risk and generate a patch from trunk.

      Attachments

        1. 8387-trunk-v1.txt
          1 kB
          Jianwei Cui

        Activity

          People

            Unassigned Unassigned
            cuijianwei Jianwei Cui
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: