[
https://issues.apache.org/jira/browse/HBASE-12295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14566406#comment-14566406
]
Anoop Sam John commented on HBASE-12295:
----------------------------------------
bq.Don't these each have their own ref count?
Now in our impl, ref count is incremented per scanner. So it is not like normal
java ref count. When we see one HFileBlock's ref count is 2 that means there
are 2 active scanners still referring to this. Those refs might be in the read
path places like comparators etc and/or by cells created from this block. So
if we have to make some thing like cell close() we will maintain the count
incremented when a Cell is created also. This creation is at HFileScanner
level. Then every cell, when closed has to decrement this count. But the
disadv for this wrt perf is we will make the counter incr/decr many times. This
has to be an atomic long and so there will be some cost. But more than that ,
the complications will be in cell filtering area etc. When the Cell is created
from Scanner level, we dont know whether this cell will get eliminated. The
cell can get ignored at many places (due to version/ttl/acl/visibility/filter
etc etc).. All these impl has to handle the close of the cell when it is being
ignored. There can be custom filters which is doing this elimination. (by
filterCell(Cell) or by filterRowCells(List<Cell>) ) All these has to handle
the close. And filter can transform an incoming cell into another and make that
to be used from then on (transformCell(Cell)) Same way CPs also can do this
filtering. There is the complication which I was telling. I actually liked
that idea so that changes in HRegion level can be avoided.. Then thinking more
and more I landed in all these kind of practical issues... Just adding here
FYI [~stack]
> Prevent block eviction under us if reads are in progress from the BBs
> ---------------------------------------------------------------------
>
> Key: HBASE-12295
> URL: https://issues.apache.org/jira/browse/HBASE-12295
> Project: HBase
> Issue Type: Sub-task
> Components: regionserver, Scanners
> Reporter: ramkrishna.s.vasudevan
> Assignee: ramkrishna.s.vasudevan
> Fix For: 2.0.0
>
> Attachments: HBASE-12295.pdf, HBASE-12295_trunk.patch
>
>
> While we try to serve the reads from the BBs directly from the block cache,
> we need to ensure that the blocks does not get evicted under us while
> reading. This JIRA is to discuss and implement a strategy for the same.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)