You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Ekaterina Dimitrova (Jira)" <ji...@apache.org> on 2022/10/06 23:24:00 UTC

[jira] [Commented] (CASSANDRA-16304) Consider implementing ClusteringComparator without a lambda

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

Ekaterina Dimitrova commented on CASSANDRA-16304:
-------------------------------------------------

Just for the record - the latest branch where those can be tested with jdk17 is -  [https://github.com/ekaterinadimitrova2/cassandra/tree/16895-trunk-sept]

It is posted on the main ticket but to make things easier to find adding it also here. 

It was rebased on trunk recently. (it is a rough WIP for testing branch, it will get cleared in time)

> Consider implementing ClusteringComparator without a lambda
> -----------------------------------------------------------
>
>                 Key: CASSANDRA-16304
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-16304
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Build
>            Reporter: Adrian Cole
>            Priority: Normal
>             Fix For: 4.x
>
>
> Using lambdas forces jamm to do things that can easily break. It might be safer to implement things like ClusteringComparator directly as classes or as an enum
> {noformat}
> Unexpected exception during request (org.apache.cassandra.transport.messages.ErrorMessage)
> java.lang.UnsupportedOperationException: can't get field offset on a hidden class: private final org.apache.cassandra.db.ClusteringComparator org.apache.cassandra.db.ClusteringComparator$$Lambda$165/0x000000010028ab60.arg$1
> 	at jdk.unsupported/sun.misc.Unsafe.objectFieldOffset(Unknown Source)
> 	at org.github.jamm.MemoryLayoutSpecification.sizeOfInstanceWithUnsafe(MemoryLayoutSpecification.java:108)
> 	at org.github.jamm.MemoryLayoutSpecification.sizeOfWithUnsafe(MemoryLayoutSpecification.java:89)
> 	at org.github.jamm.MemoryMeter.measure(MemoryMeter.java:217)
> 	at org.github.jamm.MemoryMeter.measureDeep(MemoryMeter.java:259)
> 	at org.apache.cassandra.utils.ObjectSizes.measureDeep(ObjectSizes.java:155)
> 	at org.apache.cassandra.cql3.QueryProcessor.storePreparedStatement(QueryProcessor.java:454)
> 	at org.apache.cassandra.cql3.QueryProcessor.prepare(QueryProcessor.java:424)
> 	at org.apache.cassandra.cql3.QueryProcessor.prepare(QueryProcessor.java:408)
> 	at org.apache.cassandra.transport.messages.PrepareMessage.execute(PrepareMessage.java:114)
> 	at org.apache.cassandra.transport.Message$Request.execute(Message.java:253)
> 	at org.apache.cassandra.transport.Message$Dispatcher.processRequest(Message.java:725)
> 	at org.apache.cassandra.transport.Message$Dispatcher.lambda$channelRead0$0(Message.java:630)
> 	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
> 	at org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$FutureTask.run(AbstractLocalAwareExecutorService.java:162)
> 	at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:119)
> 	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
> 	at java.base/java.lang.Thread.run(Unknown Source)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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