[ 
https://issues.apache.org/jira/browse/HBASE-17087?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15666038#comment-15666038
 ] 

Anoop Sam John commented on HBASE-17087:
----------------------------------------

bq.This is not enough I think.
I guess u saw the 1st patch I attached..   The other one (2 KB size) is having 
the patch also to get checked into src/main/patches
{code}
+++ b/hbase-protocol-shaded/src/main/patches/HBASE-17087.patch
@@ -0,0 +1,14 @@
+diff --git 
a/hbase-protocol-shaded/src/main/java/org/apache/hadoop/hbase/shaded/com/google/protobuf/ByteInputByteString.java
 
b/hbase-protocol-shaded/src/main/java/org/apache/hadoop/hbase/shaded/com/google/protobuf/ByteInputByteString.java
+index 1949602..30de4ec 100644
+--- 
a/hbase-protocol-shaded/src/main/java/org/apache/hadoop/hbase/shaded/com/google/protobuf/ByteInputByteString.java
++++ 
b/hbase-protocol-shaded/src/main/java/org/apache/hadoop/hbase/shaded/com/google/protobuf/ByteInputByteString.java
+@@ -244,6 +244,8 @@ final class ByteInputByteString extends 
ByteString.LeafByteString {
+   public CodedInputStream newCodedInput() {
+     // We trust CodedInputStream not to modify the bytes, or to give anyone
+     // else access to them.
+-    return CodedInputStream.newInstance(buffer, offset, length, true);
++    CodedInputStream cis = CodedInputStream.newInstance(buffer, offset, 
length, true);
++    cis.enableAliasing(true);
++    return cis;
+   }
+ }

{code}
All good?  Thanks for the review.. Will commit in some time.

> Enable Aliasing for CodedInputStream created by 
> ByteInputByteString#newCodedInput
> ---------------------------------------------------------------------------------
>
>                 Key: HBASE-17087
>                 URL: https://issues.apache.org/jira/browse/HBASE-17087
>             Project: HBase
>          Issue Type: Sub-task
>          Components: regionserver
>    Affects Versions: 2.0.0
>            Reporter: Anoop Sam John
>            Assignee: Anoop Sam John
>             Fix For: 2.0.0
>
>         Attachments: HBASE-17087.patch, HBASE-17087.patch
>
>
> Missed setting this while doing HBASE-15789.  We make CIS with 
> 'bufferIsImmutable' as true but we should do enableAliasing also to avoid 
> copy while building PB objects from this new CIS.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to