[
https://issues.apache.org/jira/browse/HBASE-21047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16581937#comment-16581937
]
Vishal Khandelwal commented on HBASE-21047:
-------------------------------------------
Thanks [~apurtell] and [~liuml07]
[~apurtell]
> Does this impact branch-2 and master? Or only branch-1? My guess is all. We
>will need patches for master at least to commit down the line.
Nope it should impact master as well, I would get the patch for master as well.
> From an interaction we've had I know this is Phoenix related, needed for
> local indexes to work properly. Is there a Phoenix JIRA for that? If not can
> you file it and link it here?
This fix only should resolve the phoenix issue and no additional changes would
be required in phoenix. But I have opened "PHOENIX-4852" to make this change is
picked up before using localindexes
[~liuml07]
> I don't see direct call of the constructor other than
> {{StoreFile::getStoreFileScanner()}} method. But I like the idea of increase
> / decrease safely in the same class. +1 (non-binding)
Origin of the issue is via phoenix (PHOENIX-4852) but in theory any
co-processor (/class) extending StoreFileScanner can hit this issue. Within
HBase there are no direct constructor calls.
> Nit: in test {{HColumnDescriptor hcd = mock(HColumnDescriptor.class);}} seems
> not useful. We can delete it.
will make that change in patch.
> Object creation of StoreFileScanner thru constructor and close may leave
> refCount to -1
> ---------------------------------------------------------------------------------------
>
> Key: HBASE-21047
> URL: https://issues.apache.org/jira/browse/HBASE-21047
> Project: HBase
> Issue Type: Bug
> Reporter: Vishal Khandelwal
> Assignee: Vishal Khandelwal
> Priority: Major
> Fix For: 1.5.0
>
> Attachments: HBASE-21047.branch-1.v1.patch
>
>
> During object creation "*StoreFileScanner*", it does not increase the
> refCount whereas while close it decrements the reader refCount. This will
> cause refCount to -1 and isReadReference method was returning true
> (refCount.get() != 0 This is causing store file not to be deleted. This may
> also cause issue in situation when some thread is holding a scanner but it
> may actually be closed due to above bug. Impact of this would be really high.
> Attatching patch for the fix which makes sure if reference is held either
> thru getScanner method or constructor, ref is always updated. Patch also
> contains a test which validates the issue.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)