Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
0.94.1
-
None
-
None
Description
There are some operations in HTablePool accessing PoolMap in multiple places without any explicit synchronization.
For example HTablePool.closeTablePool() calls PoolMap.values(), and calls PoolMap.remove(). If other threads add new instances to the pool in the middle of the calls, the newly added instances might be dropped. (HTablePool.closeTablePool() also has another problem that calling it by multiple threads causes accessing HTable by multiple threads.)
Moreover, PoolMap is not thread safe for the same reason.
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.
And also implementations of Pool have the same problems.
Attachments
Attachments
Issue Links
- is related to
-
HBASE-6956 Do not return back to HTablePool closed connections
- Closed
- relates to
-
HBASE-7463 [REST] Use "unmanaged" HConnection instead of HTablePool
- Closed