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

Chia-Ping Tsai commented on HBASE-19496:
----------------------------------------

bq. What is the prescription we should take on going forward? 
1) DONT expose any pb object to public user
2) DONT keep the pb object after the call is done
3) the metrics/load/status object should not extend the equals/compare methods 
since it mean all counter we add in the future must extend the equals/compare 
methods also
I introduce the new classes since the APIs of old classes will get ugly after 
we take the prescription.

> Reusing the ByteBuffer in rpc layer corrupt the ServerLoad and RegionLoad
> -------------------------------------------------------------------------
>
>                 Key: HBASE-19496
>                 URL: https://issues.apache.org/jira/browse/HBASE-19496
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Chia-Ping Tsai
>            Assignee: Chia-Ping Tsai
>            Priority: Blocker
>             Fix For: 2.0.0-beta-1
>
>         Attachments: HBASE-19496.v0.patch, HBASE-19496.v1.patch, 
> HBASE-19496.wip.patch
>
>
> {{ServerLoad}} and {{RegionLoad}} store the pb object internally but the 
> bytebuffer of pb object may be reused in rpc layer. Hence, the {{ServerLoad}} 
> and {{RegionLoad}} which saved by {{HMaster}} will be corrupted if the 
> bytebuffer backed is modified.
> This issue doesn't happen on branch-1.
> # netty server was introduced in 2.0 (see HBASE-17263)
> # reusing bytebuffer to read RPC requests was introduced in 2.0 (see 
> HBASE-15788)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to