[ 
https://issues.apache.org/jira/browse/HBASE-17291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15777830#comment-15777830
 ] 

ramkrishna.s.vasudevan commented on HBASE-17291:
------------------------------------------------

Thanks for the review [~anastas].
bq. I do not understand where the close() of the SnapshotScanner should happen 
in the common path.
The close of the SnapshotScanner happens when the Flush scanner is closed. The 
flush path creates a StoreScanner which has the memstore scanner - which is 
made up of this snapshotScanner. When the flush store scanner is closed this 
will get automatically closed.
In tests - since in the old way there was no segment ref counting - we were 
just directly clearing the snapshot and it was able to return the segments back 
when the Segment close was called.
bq.I assume you will need to wait till HBASE-17081 is finally committed (after 
it was reverted) till you can commit this one, right?
If you need more time to get HBASE-17081 to check in after all the changes are 
corrected I can commit this but you need to rebase HBASE-17081 on top of this.
BTW what I think since HBASE-17333 solves the test case issue it is better we 
commit HBASE-17081 now?

> Remove ImmutableSegment#getKeyValueScanner
> ------------------------------------------
>
>                 Key: HBASE-17291
>                 URL: https://issues.apache.org/jira/browse/HBASE-17291
>             Project: HBase
>          Issue Type: Improvement
>          Components: Scanners
>    Affects Versions: 2.0.0
>            Reporter: ramkrishna.s.vasudevan
>            Assignee: ramkrishna.s.vasudevan
>             Fix For: 2.0.0
>
>         Attachments: HBASE-17291.patch, HBASE-17291_1.patch, 
> HBASE-17291_2.patch
>
>
> This is based on a discussion over [~anastas]'s patch. The MemstoreSnapshot 
> uses a KeyValueScanner which actually seems redundant considering we already 
> have a SegmentScanner. The idea is that the snapshot scanner should be a 
> simple iterator type of scanner but it lacks the capability to do the 
> reference counting on that segment that is now used in snapshot. With 
> snapshot having mulitple segments in the latest impl it is better we hold on 
> to the segment by doing ref counting. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to