hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Purtell <andrew.purt...@gmail.com>
Subject Re: DISCUSSION: A tightening of the CP contract in hbase 2.0.0
Date Thu, 18 Feb 2016 20:02:56 GMT
> In HBase 2.0, CPs can read Cells passed them on a CP hook invocation but they must not
retain references beyond the life of the invocation; they must copy Cells if they intend to
retain them beyond the invocation, pass the Cells off to upper tiers, or return them otherwise
to clients.

IMO, this is what we should expect already and can document ASAP. 


> On Feb 18, 2016, at 11:09 AM, Stack <stack@duboce.net> wrote:
> 
> In HBase 2.0, CPs can read Cells passed them on a CP hook invocation but
> they must not retain references beyond the life of the invocation; they
> must copy Cells if they intend to retain them beyond the invocation, pass
> the Cells off to upper tiers, or return them otherwise to clients.
> 
> The above stricture is explicitly put on CPs going forward as it can no
> longer be presumed Cells are self-contained. In particular, Cells may not
> 'own' their memory but rather just referencing a backing, memory block.
> Internal reference-counting to which CPs cannot be made privvy determines
> when it is safe to let go of the backing memory. If a CP retains Cell
> references beyond an invocation, it may find that a later read returns
> unexpected results.
> 
> For obvious reasons, HBase cannot pass CPs Cell copies on each invocation.
> 
> Are you all good with this?
> 
> If so, we'll add the above to Interfaces and message it to downstreamers,
> etc.
> 
> Thanks,
> Anoop, Ram, and St.Ack

Mime
View raw message