[
https://issues.apache.org/jira/browse/CASSANDRA-16304?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17239605#comment-17239605
]
Benedict Elliott Smith commented on CASSANDRA-16304:
----------------------------------------------------
I think we need to find a work around in JAMM, or our use of it, as this is
only going to become more and more common (though perhaps in this instance it
might anyway be better not to use a lambda; not sure)
> Consider implementing ClusteringComparator without a lambda
> -----------------------------------------------------------
>
> Key: CASSANDRA-16304
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16304
> Project: Cassandra
> Issue Type: Improvement
> Reporter: Adrian Cole
> Priority: Normal
>
> 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.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]