[
https://issues.apache.org/jira/browse/HBASE-16372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15430036#comment-15430036
]
ramkrishna.s.vasudevan commented on HBASE-16372:
------------------------------------------------
bq. we change the curBlock and move the old cur block to prevBlock. If there
was an already block pointed by prevBlock move that to oldBlocks. So when the
call returnBlocks(boolean returnAll) comes, we will return only oldBlocks if
param is false. If true we return from all 3 refs.
My initial impl to solve this was to always return the (last - 1) blocks in a
shipped() call and then if the shipped() call is with true return all blocks.
We won't have 3 references. So the list holding the previous blocks will
always have one element in it (the last block that was accessed). Internally
which means we still maintain a ref to the actual previous block.
In all the above ways - the problem of not giving a chance for the block to be
evicted happens - yes though it is LRU stil this is there. So did not want to
do that way. But yes we can explore it no problem.
bq.One more thing to note is that in read flow, when a seek or next call result
in jumping out many blocks in btw, are we assigning curBlock with the in btw
blocks?
I don't think we do it. Once we are sure we are going to read from this block
only that we update as the curBlock ref. I can verify once again.
> References to previous cell in read path should be avoided
> ----------------------------------------------------------
>
> Key: HBASE-16372
> URL: https://issues.apache.org/jira/browse/HBASE-16372
> Project: HBase
> Issue Type: Sub-task
> Components: Scanners
> Affects Versions: 2.0.0
> Reporter: ramkrishna.s.vasudevan
> Assignee: ramkrishna.s.vasudevan
> Priority: Critical
> Fix For: 2.0.0
>
> Attachments: HBASE-16372_testcase.patch, HBASE-16372_testcase_1.patch
>
>
> Came as part of review discussion in HBASE-15554. If there are references
> kept to previous cells in the read path, with the Ref count based eviction
> mechanism in trunk, then chances are there to evict a block backing the
> previous cell but the read path still does some operations on that garbage
> collected previous cell leading to incorrect results.
> Areas to target
> -> Storescanner
> -> Bloom filters (particularly in compaction path)
> Thanks to [~anoop.hbase] to point out this in bloomfilter path. But we found
> it could be in other areas also.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)