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

Blake Eggleston commented on CASSANDRA-15108:
---------------------------------------------

[~djoshi3] {{computeIfAbsent}} doesn't work for this situation. Since JMX 
metrics register themselves in their ctor, we need to create the metric exactly 
once, otherwise we'll get duplicate name exceptions (the problem the 
synchronization is solving). Although computeIfAbsent is thread safe in the 
context of the map, it uses compare and swap to add the computed value to the 
map. This means it eagerly allocates new metric instances, which can cause the 
jmx name collision we're trying to avoid if multiple calls interleave.

> Support building Cassandra with JDK 11
> --------------------------------------
>
>                 Key: CASSANDRA-15108
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-15108
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Build
>            Reporter: Blake Eggleston
>            Assignee: Blake Eggleston
>            Priority: Normal
>
> With the changes in java 8 support and licensing, we should be able to build 
> and run Cassandra with java 11.



--
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