[
https://issues.apache.org/jira/browse/HBASE-21628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16728180#comment-16728180
]
cong.han commented on HBASE-21628:
----------------------------------
[~stack]
To the first question, the old version ClientAsyncPrefetchScanner use custom
thread to do the async scan work , if user
1 Forgot to call close() method
2 The result are not full fetched
the custom thread will not exit until we shutdown the application.
and scan is a high-frequency api which increase the risk above.
If we replace the custom thread with executors,users can use custom executors
which they can close by
themselves,or use htable's thread pool which we can handle correctly.
To the second question,I checked the LockSupport api,use static object isn't a
good choice,I use ClientAsyncPrefetchScanner which block the thread for a
replacement,is this ok?
to the third question,"We throw DifferentScanThreadException if two threads
share a prefetcher " is much clear,fixed.
> memory leak risk when ClientAsyncPrefetchScanner not close
> ----------------------------------------------------------
>
> Key: HBASE-21628
> URL: https://issues.apache.org/jira/browse/HBASE-21628
> Project: HBase
> Issue Type: Improvement
> Reporter: cong.han
> Assignee: cong.han
> Priority: Major
> Attachments: HBASE-21328-v1.patch, HBASE-21628-v2.patch,
> HBASE-21628-v3.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)