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

Reply via email to