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

Blake Eggleston edited comment on CASSANDRA-14607 at 3/13/19 4:21 AM:
----------------------------------------------------------------------

I think we could get the java 8 behavior in java 11 by moving the update logic 
of {{addAllWithSizeDelta}} into a private method, shuffling the 'shouldLock' 
logic around, and just using a {{synchronized}} block. This would work in both 
java 8 and java 11, so we wouldn't need the java8 and java11 source directories.

I pushed up a branch showing how this would work here: 
[https://github.com/bdeggleston/cassandra/tree/14607]

I may be missing some nuance in the usage of {{monitorEnter/Exit}} (I couldn't 
find a lot of documentation on the method, or explanations for why we were 
using it), but I think this would be functionally identical to what we were 
doing with {{monitorEnter/Exit}}.

WDYT [~benedict] & [~jasobrown]?

Edit: That branch is just for illustration, it's not a finished patch. At a 
minimum it still needs to fix the handling of {{inputDeletionInfoCopy}}, 
condense the {{AbstractBTreePartition}} class structure, and remove the java8 
and java11 source directories.


was (Author: bdeggleston):
I think we could get the java 8 behavior in java 11 by moving the update logic 
of {{addAllWithSizeDelta}} into a private method, shuffling the 'shouldLock' 
logic around, and just using a {{synchronized}} block. This would work in both 
java 8 and java 11, so we wouldn't need the java8 and java11 source directories.

I pushed up a branch showing how this would work here: 
[https://github.com/bdeggleston/cassandra/tree/14607]

I may be missing some nuance in the usage of {{monitorEnter/Exit}} (I couldn't 
find a lot of documentation on the method, or explanations for why we were 
using it), but I think this would be functionally identical to what we were 
doing with {{monitorEnter/Exit}}.

WDYT [~benedict] & [~jasobrown]?

> Explore optimizations in AbstractBtreePartiton, java 11 variant
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-14607
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-14607
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Legacy/Core
>            Reporter: Jason Brown
>            Priority: Normal
>              Labels: Java11
>             Fix For: 4.0
>
>
> In CASSANDRA-9608, we discussed some way to optimize the java 11 
> implementation of {{AbstractBTreePartition}}. This ticket serves that 
> purpose, as well as a "note to selves" to ensure the java 11 version does not 
> have a performance regression.



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