[
https://issues.apache.org/jira/browse/HBASE-21628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16739652#comment-16739652
]
stack commented on HBASE-21628:
-------------------------------
Took a quick look. A lot of new moving parts. Do we have to add prefetch
condition to Scan?
Do we have to pass in a new executorservice just for prefetch? Can't we use the
one that is passed in already?
The below is trying to override the existing prefetchCondidtion method?
86 if (prefetchCondition == null) {
87 this.prefetchCondition = (maxCacheSize,currentCacheSize) ->
this.prefetchCondition();
So, the different thread possibility is new to this patch?
118 if (!scanThread.compareAndSet(null,Thread.currentThread())
119 && scanThread.get() != Thread.currentThread()) {
Here on each next we are doing an atomic op. Do we have to? This is because we
are using executorpool and can't be sure same thread passed? The old manner of
starting a dedicated thread didn't necessitate this because we knew there one
dedicated thread only?
> memory leak risk when ClientAsyncPrefetchScanner not close
> ----------------------------------------------------------
>
> Key: HBASE-21628
> URL: https://issues.apache.org/jira/browse/HBASE-21628
> Project: HBase
> Issue Type: Bug
> Reporter: cong.han
> Assignee: cong.han
> Priority: Major
> Attachments: HBASE-21328-v1.patch, HBASE-21628-v2.patch,
> HBASE-21628-v3.patch, HBASE-21628-v4.patch, HBASE-21628-v5.patch,
> HBASE-21628-v5.patch, HBASE-21628-v5.patch
>
>
> When we use ClientAsyncPrefetchScanner and we do two things below
> 1 Forgot to call close() method
> 2 The result are not full fetched
> The prefetch thread will not exit and leave a memory leak risk.
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)