[
https://issues.apache.org/jira/browse/HBASE-28224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17795934#comment-17795934
]
Becker Ewing commented on HBASE-28224:
--------------------------------------
I've just run into this issue as well. In addition to the MobFileCache thread
leak, it looks like the ClientSideRegionScanner doesn't shutdown the block
cache as well (as there are tons of "LruBlockCacheStatsExecutor" threads that
remain after the scanner closes).
It looks like the shutdown for the MobFileCache and the BlockCache are
typically handled by RegionServerServices. However, in ClientSideRegionScanner
we don't pass in an instance of RegionServerServices and instead [manually
construct a BlockCache and MobFileCache that are manually installed into the
underlying Region instance of the
ClientSideRegionScanner|https://github.com/apache/hbase/blob/3d117125892ee36e8a66171fba3a223c09bc0b9a/hbase-server/src/main/java/org/apache/hadoop/hbase/client/ClientSideRegionScanner.java#L72-L77].
We should absolutely handle the lifecycle of these resources after we
initialize them.
> ClientSideRegionScanner appears not to shutdown MobFileCache
> ------------------------------------------------------------
>
> Key: HBASE-28224
> URL: https://issues.apache.org/jira/browse/HBASE-28224
> Project: HBase
> Issue Type: Bug
> Components: Scanners
> Affects Versions: 2.5.5
> Reporter: Mark Hale
> Priority: Minor
>
> As far as I can tell from the code, and also what I see in jstack,
> ClientSideRegionScanner doesn't appear to shutdown it's MobFileCache. After
> doing a lot of scanning of a snapshot, application threads are polluted with
> a lot of MobFileCache ScheduledThreadPoolExecutors that never seem to get
> cleaned up.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)