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

Robert Stupp commented on CASSANDRA-9608:
-----------------------------------------

{quote}I assume this is to handle e.g. the removal of 
Unsafe.monitorEnter/monitorExit?
{quote}
Right.
{quote}could go with the {{volatile ReentrantLock}}
{quote}
A {{ReentrantLock}} would need to be allocated and used "pessimistically" 
up-front - i.e. for every instance of {{AtomicBTreePartition}}, so some 
non-negligible overhead to what we have now.

We could, as [~benedict] proposed, use some "special" handling and gave it [a 
try in this 
commit|https://github.com/snazy/cassandra/commit/41ea5eb96c95d7896b452df7ae228ecccd95c660].
 Haven't tested it though, but it's based on {{SimpleCondition}} instead of 
{{Lock}}, because that one is a) already in the code base and b) doesn't 
require an explicit {{lock()}}, and therefore prevents the "pessimistic" 
allocation and use in every case.

> Support Java 11
> ---------------
>
>                 Key: CASSANDRA-9608
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-9608
>             Project: Cassandra
>          Issue Type: Task
>            Reporter: Robert Stupp
>            Assignee: Robert Stupp
>            Priority: Minor
>             Fix For: 4.x
>
>         Attachments: jdk_9_10.patch
>
>
> This ticket is intended to group all issues found to support Java 9 in the 
> future.
> From what I've found out so far:
> * Maven dependency {{com.sun:tools:jar:0}} via cobertura cannot be resolved. 
> It can be easily solved using this patch:
> {code}
> -        <dependency groupId="net.sourceforge.cobertura" 
> artifactId="cobertura"/>
> +        <dependency groupId="net.sourceforge.cobertura" 
> artifactId="cobertura">
> +          <exclusion groupId="com.sun" artifactId="tools"/>
> +        </dependency>
> {code}
> * Another issue is that {{sun.misc.Unsafe}} no longer contains the methods 
> {{monitorEnter}} + {{monitorExit}}. These methods are used by 
> {{o.a.c.utils.concurrent.Locks}} which is only used by 
> {{o.a.c.db.AtomicBTreeColumns}}.
> I don't mind to start working on this yet since Java 9 is in a too early 
> development phase.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to