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

Todd Lipcon commented on HDFS-13611:
------------------------------------

+1, looks good. While we're at it, we could reduce one extra conversion round 
trip by using ByteString.copyFrom(key.getBytes(), 0, key.getLength()). That 
said, the expectation is that misses on this cache are extremely rare so it 
probably doesn't matter. Up to you.

> Unsafe use of Text as a ConcurrentHashMap key in PBHelperClient
> ---------------------------------------------------------------
>
>                 Key: HDFS-13611
>                 URL: https://issues.apache.org/jira/browse/HDFS-13611
>             Project: Hadoop HDFS
>          Issue Type: Bug
>    Affects Versions: 2.10.0, 3.2.0, 3.1.1, 3.0.4
>            Reporter: Andrew Wang
>            Assignee: Andrew Wang
>            Priority: Major
>         Attachments: HDFS-13611.001.patch, HDFS-13611.002.patch
>
>
> Follow on to HDFS-13601, a bug spotted by [~tlipcon]: since Text is mutable, 
> it's not safe to use as a hash map key.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to