Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Abandoned
-
0.98.0
-
None
-
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.