[
https://issues.apache.org/jira/browse/HBASE-21088?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16588880#comment-16588880
]
Ted Yu commented on HBASE-21088:
--------------------------------
As I explained at the end of this comment:
https://issues.apache.org/jira/browse/HBASE-21088?focusedCommentId=16587986&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16587986
If loadStoreFiles() encounters exception, it would close already opened store
file readers.
When control returns to hasReferences(), reloadedStoreFiles would not be
assigned.
There is nothing much that can be done in hasReferences() under this scenario.
If StoreUtils.hasReferences() throws any exception (possibly due to code change
in the future), the opened store files would be closed (in patch v2).
> HStoreFile should be closed in HStore#hasReferences
> ---------------------------------------------------
>
> Key: HBASE-21088
> URL: https://issues.apache.org/jira/browse/HBASE-21088
> Project: HBase
> Issue Type: Bug
> Reporter: Ted Yu
> Assignee: Ted Yu
> Priority: Major
> Attachments: 21088.v1.txt, 21088.v2.txt, 21088.v2.txt
>
>
> {code}
> reloadedStoreFiles = loadStoreFiles();
> return StoreUtils.hasReferences(reloadedStoreFiles);
> {code}
> The intention of obtaining the HStoreFile's is to check for references.
> The loaded HStoreFile's should be closed prior to return to prevent leak.
> I noticed the increase in open files when running test suite. After checking
> recently modified code, I came to this particular method.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)