[
https://issues.apache.org/jira/browse/CASSANDRA-12999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15732351#comment-15732351
]
Jason Brown commented on CASSANDRA-12999:
-----------------------------------------
[~dikanggu] I see you beat me to the punch :).
In your patch, I'm wondering if we should skip the lock acquisition in
{{TokenMetadata#getSizeOfAllEndpoints}} and
{{TokenMetadata#getSizeOfLeavingEndpoints}}. We're doing a simple size look up
(against what is a {{HashMap}}, at the end of the day), so it's a safe enough
lookup. I would, however, add a javadoc comment to each of the methods
indicating that.
Also, can you add a couple of unit tests for the two methods you added? It
should be pretty quick to do so.
> add method to get size of endpoints to TokenMetadata
> ----------------------------------------------------
>
> Key: CASSANDRA-12999
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12999
> Project: Cassandra
> Issue Type: Improvement
> Reporter: Jason Brown
> Assignee: Jason Brown
> Priority: Minor
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)