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

Jason Brown commented on CASSANDRA-9608:
----------------------------------------

{quote}I assume this is to handle e.g. the removal of 
Unsafe.monitorEnter/monitorExit?
{quote}

Ahh, sorry for the lack of context, [~benedict], but yes, you've hit the nail 
on the head.

I was racking my brain to see if there's an alternative to allocating an object 
on-demand, which of course requires contending on assignment to a share field 
in the {{AtomibBTreePartitionBase}}, and then contend on the allocated object. 
(Which is what {{Unsafe.monitorEnter()}} gave us a way around). I see we're not 
gonna be that lucky.

bq. Or we could implement some static helper methods to help us lock against a 
property using a special inflated lock object, that can be used for 
synchronisation until there is no contention, and the last owning thread sets 
the property to null on completion

I'd be interested in a sample of this as, tbqh, I don't understand what you are 
proposing here - but I don't want you invest a lot of time just for my 
edification. I suspect, at a minimum, we could go with the {{volatile 
ReentrantLock}} for now, but could consider [~benedict]'s idea if it's 
reasonable (and doesn't burden him too much). wdyt, [~snazy]?

> 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