[
https://issues.apache.org/jira/browse/HBASE-26777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17499353#comment-17499353
]
Istvan Toth commented on HBASE-26777:
-------------------------------------
Thanks for the quick answers Andrew and Josh.
Looking at the code, sometimes, like in prepareMiniBatchOperations() we really
just want to do a get, and keep the resulting Cells in scope for a long time,
and I don't think we can avoid copying those to the heap anyway, if not in
getInternal(), then from the caller side.
However, prepareMiniBatchOperations() is the only place I found where we need
to do this, so deprecating / removing internalGet() in 3.x may still be a good
idea.
For now, we can leave BufferedDataBlockEncoder.OffheapDecodedExtendedCell
alone, and explictly copy the cell to a new KeyValue in HRegion.getInternal().
I've updated my PR to leave deepClone() alone.
Revisiting the refactors done in HBASE-26036 , it seems that refactor changes
the behaviour more than I thought.
Pre HBASE-26036 HRegion.get() called the coprocessors on the get(), and created
a Trace span for it, as well as preforming some sanity checks. The new code
does not do any of that.
I'm not saying that not calling the coprocessors hooks, or creating trace scans
for internal gets is problem, just making the observation.
> BufferedDataBlockEncoder$OffheapDecodedExtendedCell.deepClone throws
> UnsupportedOperationException
> --------------------------------------------------------------------------------------------------
>
> Key: HBASE-26777
> URL: https://issues.apache.org/jira/browse/HBASE-26777
> Project: HBase
> Issue Type: Bug
> Components: regionserver
> Affects Versions: 2.4.10
> Reporter: Istvan Toth
> Assignee: Istvan Toth
> Priority: Major
>
> BufferedDataBlockEncoder$OffheapDecodedExtendedCell.deepClone throws an
> unsupportedException.
> However, org.apache.hadoop.hbase.regionserver.HRegion.get(Get, boolean, long,
> long)
> calls the method:
> {code:java}
> // Copy EC to heap, then close the scanner.
> // This can be an EXPENSIVE call. It may make an extra copy from
> offheap to onheap buffers.
> // See more details in HBASE-26036.
> for (Cell cell : tmp) {
> results.add(cell instanceof ByteBufferExtendedCell ?
> ((ByteBufferExtendedCell) cell).deepClone(): cell);
> } {code}
> According to the comment above, this is probably caused by HBASE-26036.
>
--
This message was sent by Atlassian Jira
(v8.20.1#820001)