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

Dmitry Konstantinov edited comment on CASSANDRA-20173 at 5/15/25 3:32 PM:
--------------------------------------------------------------------------

I am analysing currently the failed SAI test: 
org.apache.cassandra.index.sai.cql.VectorTypeTest#lwtTest
It does not fail in 5.0-based feature branch but fails in trunk-based one..
{code}
java.lang.UnsupportedOperationException
        at 
org.apache.cassandra.db.marshal.NativeAccessor.factory(NativeAccessor.java:483)
        at 
org.apache.cassandra.db.ClusteringBound.create(ClusteringBound.java:89)
        at 
org.apache.cassandra.db.ClusteringBound.inclusiveStartOf(ClusteringBound.java:94)
        at org.apache.cassandra.db.Slice.make(Slice.java:105)
        at 
org.apache.cassandra.db.filter.ClusteringIndexNamesFilter.getSlices(ClusteringIndexNamesFilter.java:134)
        at 
org.apache.cassandra.db.SinglePartitionReadCommand.queryMemtableAndSSTablesInTimestampOrder(SinglePartitionReadCommand.java:999)
        at 
org.apache.cassandra.db.SinglePartitionReadCommand.queryMemtableAndDiskInternal(SinglePartitionReadCommand.java:751)
        at 
org.apache.cassandra.db.SinglePartitionReadCommand.queryMemtableAndDisk(SinglePartitionReadCommand.java:724)
        at 
org.apache.cassandra.index.sai.plan.QueryController.queryStorage(QueryController.java:173)
        at 
org.apache.cassandra.index.sai.plan.StorageAttachedIndexSearcher$ResultRetriever.queryStorageAndFilter(StorageAttachedIndexSearcher.java:402)
        at 
org.apache.cassandra.index.sai.plan.StorageAttachedIndexSearcher$ResultRetriever.nextRowIterator(StorageAttachedIndexSearcher.java:206)
        at 
org.apache.cassandra.index.sai.plan.StorageAttachedIndexSearcher$ResultRetriever.computeNext(StorageAttachedIndexSearcher.java:186)
        at 
org.apache.cassandra.index.sai.plan.StorageAttachedIndexSearcher$ResultRetriever.computeNext(StorageAttachedIndexSearcher.java:136)
        at 
org.apache.cassandra.utils.AbstractIterator.hasNext(AbstractIterator.java:47)
        at 
org.apache.cassandra.index.sai.plan.VectorTopKProcessor.filter(VectorTopKProcessor.java:95)
        at 
org.apache.cassandra.index.sai.plan.StorageAttachedIndexSearcher.search(StorageAttachedIndexSearcher.java:127)
        at 
org.apache.cassandra.db.ReadCommand.executeLocally(ReadCommand.java:518)
        at 
org.apache.cassandra.db.AbstractReadQuery.executeInternal(AbstractReadQuery.java:65)
        at 
org.apache.cassandra.db.ReadCommand.executeInternal(ReadCommand.java:120)
        at 
org.apache.cassandra.cql3.statements.SelectStatement.executeInternal(SelectStatement.java:671)
        at 
org.apache.cassandra.cql3.statements.SelectStatement.executeLocally(SelectStatement.java:642)
        at 
org.apache.cassandra.cql3.statements.SelectStatement.executeLocally(SelectStatement.java:154)
        at 
org.apache.cassandra.cql3.QueryProcessor.executeInternal(QueryProcessor.java:494)
        at 
org.apache.cassandra.cql3.CQLTester.executeFormattedQuery(CQLTester.java:1752)
        at org.apache.cassandra.index.sai.SAITester.execute(SAITester.java:626)
        at 
org.apache.cassandra.index.sai.cql.VectorTypeTest.lwtTest(VectorTypeTest.java:395)
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
        at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
        at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
        at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
        at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
        at 
com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
        at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
        at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
        at org.junit.rules.RunRules.evaluate(RunRules.java:20)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
        at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
        at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
        at 
com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
        at 
com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
        at 
com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
        at 
com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
        at 
com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:232)
        at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:55)


java.lang.AssertionError: Property error detected:
Seed: -1156867763096142862 -- To rerun do 
-Dcassandra.test.random.seed=-1156867763096142862
Config:
        ---
        partitioner: Murmur3Partitioner
        commitlog_sync: periodic
        commitlog_sync_period: 10s
        commitlog_disk_access_mode: auto
        memtable_allocation_type: offheap_objects
        memtable:
          configurations:
            SkipListMemtable_0:
              inherits: SkipListMemtable_base
            TrieMemtable_0:
              inherits: TrieMemtable_base
            TrieMemtable:
              inherits: TrieMemtable_0
            SkipListMemtable:
              inherits: SkipListMemtable_1
            SkipListMemtable_base:
              class_name: SkipListMemtable
            ShardedSkipListMemtable:
              inherits: ShardedSkipListMemtable_base
            default:
              inherits: ShardedSkipListMemtable
            TrieMemtable_base:
              class_name: TrieMemtable
            SkipListMemtable_1:
              inherits: SkipListMemtable_0
            ShardedSkipListMemtable_base:
              class_name: ShardedSkipListMemtable
              parameters:
                serialize_writes: true
        sstable:
          selected_format: big
        disk_access_mode: mmap_index_only
        
Error:
        java.lang.UnsupportedOperationException

        at 
org.apache.cassandra.cql3.CQLTester$Fuzzed.throwPropertyError(CQLTester.java:3539)
        at 
org.apache.cassandra.cql3.CQLTester$Fuzzed$FailureWatcher.failed(CQLTester.java:3525)
        at org.junit.rules.TestWatcher.failedQuietly(TestWatcher.java:84)
        at org.junit.rules.TestWatcher.access$300(TestWatcher.java:46)
        at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:62)
        at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
        at org.junit.rules.RunRules.evaluate(RunRules.java:20)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
        at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
        at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
        at 
com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
        at 
com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
        at 
com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
        at 
com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
        at 
com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:232)
        at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:55)
Caused by: java.lang.UnsupportedOperationException
        at 
org.apache.cassandra.db.marshal.NativeAccessor.factory(NativeAccessor.java:483)
        at 
org.apache.cassandra.db.ClusteringBound.create(ClusteringBound.java:89)
        at 
org.apache.cassandra.db.ClusteringBound.inclusiveStartOf(ClusteringBound.java:94)
        at org.apache.cassandra.db.Slice.make(Slice.java:105)
        at 
org.apache.cassandra.db.filter.ClusteringIndexNamesFilter.getSlices(ClusteringIndexNamesFilter.java:134)
        at 
org.apache.cassandra.db.SinglePartitionReadCommand.queryMemtableAndSSTablesInTimestampOrder(SinglePartitionReadCommand.java:999)
        at 
org.apache.cassandra.db.SinglePartitionReadCommand.queryMemtableAndDiskInternal(SinglePartitionReadCommand.java:751)
        at 
org.apache.cassandra.db.SinglePartitionReadCommand.queryMemtableAndDisk(SinglePartitionReadCommand.java:724)
        at 
org.apache.cassandra.index.sai.plan.QueryController.queryStorage(QueryController.java:173)
        at 
org.apache.cassandra.index.sai.plan.StorageAttachedIndexSearcher$ResultRetriever.queryStorageAndFilter(StorageAttachedIndexSearcher.java:402)
        at 
org.apache.cassandra.index.sai.plan.StorageAttachedIndexSearcher$ResultRetriever.nextRowIterator(StorageAttachedIndexSearcher.java:206)
        at 
org.apache.cassandra.index.sai.plan.StorageAttachedIndexSearcher$ResultRetriever.computeNext(StorageAttachedIndexSearcher.java:186)
        at 
org.apache.cassandra.index.sai.plan.StorageAttachedIndexSearcher$ResultRetriever.computeNext(StorageAttachedIndexSearcher.java:136)
        at 
org.apache.cassandra.utils.AbstractIterator.hasNext(AbstractIterator.java:47)
        at 
org.apache.cassandra.index.sai.plan.VectorTopKProcessor.filter(VectorTopKProcessor.java:95)
        at 
org.apache.cassandra.index.sai.plan.StorageAttachedIndexSearcher.search(StorageAttachedIndexSearcher.java:127)
        at 
org.apache.cassandra.db.ReadCommand.executeLocally(ReadCommand.java:518)
        at 
org.apache.cassandra.db.AbstractReadQuery.executeInternal(AbstractReadQuery.java:65)
        at 
org.apache.cassandra.db.ReadCommand.executeInternal(ReadCommand.java:120)
        at 
org.apache.cassandra.cql3.statements.SelectStatement.executeInternal(SelectStatement.java:671)
        at 
org.apache.cassandra.cql3.statements.SelectStatement.executeLocally(SelectStatement.java:642)
        at 
org.apache.cassandra.cql3.statements.SelectStatement.executeLocally(SelectStatement.java:154)
        at 
org.apache.cassandra.cql3.QueryProcessor.executeInternal(QueryProcessor.java:494)
        at 
org.apache.cassandra.cql3.CQLTester.executeFormattedQuery(CQLTester.java:1752)
        at org.apache.cassandra.index.sai.SAITester.execute(SAITester.java:626)
        at 
org.apache.cassandra.index.sai.cql.VectorTypeTest.lwtTest(VectorTypeTest.java:395)
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
        at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
        at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
        at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
        at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
        at 
com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
        at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
        ... 20 more
{code}


was (Author: dnk):
I am analysing currently the failed SAI test: 
org.apache.cassandra.index.sai.cql.VectorTypeTest#lwtTest
It does not fail in 5.0-based branch but fails in trunk-based one..
{code}
java.lang.UnsupportedOperationException
        at 
org.apache.cassandra.db.marshal.NativeAccessor.factory(NativeAccessor.java:483)
        at 
org.apache.cassandra.db.ClusteringBound.create(ClusteringBound.java:89)
        at 
org.apache.cassandra.db.ClusteringBound.inclusiveStartOf(ClusteringBound.java:94)
        at org.apache.cassandra.db.Slice.make(Slice.java:105)
        at 
org.apache.cassandra.db.filter.ClusteringIndexNamesFilter.getSlices(ClusteringIndexNamesFilter.java:134)
        at 
org.apache.cassandra.db.SinglePartitionReadCommand.queryMemtableAndSSTablesInTimestampOrder(SinglePartitionReadCommand.java:999)
        at 
org.apache.cassandra.db.SinglePartitionReadCommand.queryMemtableAndDiskInternal(SinglePartitionReadCommand.java:751)
        at 
org.apache.cassandra.db.SinglePartitionReadCommand.queryMemtableAndDisk(SinglePartitionReadCommand.java:724)
        at 
org.apache.cassandra.index.sai.plan.QueryController.queryStorage(QueryController.java:173)
        at 
org.apache.cassandra.index.sai.plan.StorageAttachedIndexSearcher$ResultRetriever.queryStorageAndFilter(StorageAttachedIndexSearcher.java:402)
        at 
org.apache.cassandra.index.sai.plan.StorageAttachedIndexSearcher$ResultRetriever.nextRowIterator(StorageAttachedIndexSearcher.java:206)
        at 
org.apache.cassandra.index.sai.plan.StorageAttachedIndexSearcher$ResultRetriever.computeNext(StorageAttachedIndexSearcher.java:186)
        at 
org.apache.cassandra.index.sai.plan.StorageAttachedIndexSearcher$ResultRetriever.computeNext(StorageAttachedIndexSearcher.java:136)
        at 
org.apache.cassandra.utils.AbstractIterator.hasNext(AbstractIterator.java:47)
        at 
org.apache.cassandra.index.sai.plan.VectorTopKProcessor.filter(VectorTopKProcessor.java:95)
        at 
org.apache.cassandra.index.sai.plan.StorageAttachedIndexSearcher.search(StorageAttachedIndexSearcher.java:127)
        at 
org.apache.cassandra.db.ReadCommand.executeLocally(ReadCommand.java:518)
        at 
org.apache.cassandra.db.AbstractReadQuery.executeInternal(AbstractReadQuery.java:65)
        at 
org.apache.cassandra.db.ReadCommand.executeInternal(ReadCommand.java:120)
        at 
org.apache.cassandra.cql3.statements.SelectStatement.executeInternal(SelectStatement.java:671)
        at 
org.apache.cassandra.cql3.statements.SelectStatement.executeLocally(SelectStatement.java:642)
        at 
org.apache.cassandra.cql3.statements.SelectStatement.executeLocally(SelectStatement.java:154)
        at 
org.apache.cassandra.cql3.QueryProcessor.executeInternal(QueryProcessor.java:494)
        at 
org.apache.cassandra.cql3.CQLTester.executeFormattedQuery(CQLTester.java:1752)
        at org.apache.cassandra.index.sai.SAITester.execute(SAITester.java:626)
        at 
org.apache.cassandra.index.sai.cql.VectorTypeTest.lwtTest(VectorTypeTest.java:395)
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
        at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
        at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
        at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
        at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
        at 
com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
        at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
        at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
        at org.junit.rules.RunRules.evaluate(RunRules.java:20)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
        at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
        at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
        at 
com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
        at 
com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
        at 
com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
        at 
com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
        at 
com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:232)
        at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:55)


java.lang.AssertionError: Property error detected:
Seed: -1156867763096142862 -- To rerun do 
-Dcassandra.test.random.seed=-1156867763096142862
Config:
        ---
        partitioner: Murmur3Partitioner
        commitlog_sync: periodic
        commitlog_sync_period: 10s
        commitlog_disk_access_mode: auto
        memtable_allocation_type: offheap_objects
        memtable:
          configurations:
            SkipListMemtable_0:
              inherits: SkipListMemtable_base
            TrieMemtable_0:
              inherits: TrieMemtable_base
            TrieMemtable:
              inherits: TrieMemtable_0
            SkipListMemtable:
              inherits: SkipListMemtable_1
            SkipListMemtable_base:
              class_name: SkipListMemtable
            ShardedSkipListMemtable:
              inherits: ShardedSkipListMemtable_base
            default:
              inherits: ShardedSkipListMemtable
            TrieMemtable_base:
              class_name: TrieMemtable
            SkipListMemtable_1:
              inherits: SkipListMemtable_0
            ShardedSkipListMemtable_base:
              class_name: ShardedSkipListMemtable
              parameters:
                serialize_writes: true
        sstable:
          selected_format: big
        disk_access_mode: mmap_index_only
        
Error:
        java.lang.UnsupportedOperationException

        at 
org.apache.cassandra.cql3.CQLTester$Fuzzed.throwPropertyError(CQLTester.java:3539)
        at 
org.apache.cassandra.cql3.CQLTester$Fuzzed$FailureWatcher.failed(CQLTester.java:3525)
        at org.junit.rules.TestWatcher.failedQuietly(TestWatcher.java:84)
        at org.junit.rules.TestWatcher.access$300(TestWatcher.java:46)
        at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:62)
        at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
        at org.junit.rules.RunRules.evaluate(RunRules.java:20)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
        at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
        at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
        at 
com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
        at 
com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
        at 
com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
        at 
com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
        at 
com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:232)
        at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:55)
Caused by: java.lang.UnsupportedOperationException
        at 
org.apache.cassandra.db.marshal.NativeAccessor.factory(NativeAccessor.java:483)
        at 
org.apache.cassandra.db.ClusteringBound.create(ClusteringBound.java:89)
        at 
org.apache.cassandra.db.ClusteringBound.inclusiveStartOf(ClusteringBound.java:94)
        at org.apache.cassandra.db.Slice.make(Slice.java:105)
        at 
org.apache.cassandra.db.filter.ClusteringIndexNamesFilter.getSlices(ClusteringIndexNamesFilter.java:134)
        at 
org.apache.cassandra.db.SinglePartitionReadCommand.queryMemtableAndSSTablesInTimestampOrder(SinglePartitionReadCommand.java:999)
        at 
org.apache.cassandra.db.SinglePartitionReadCommand.queryMemtableAndDiskInternal(SinglePartitionReadCommand.java:751)
        at 
org.apache.cassandra.db.SinglePartitionReadCommand.queryMemtableAndDisk(SinglePartitionReadCommand.java:724)
        at 
org.apache.cassandra.index.sai.plan.QueryController.queryStorage(QueryController.java:173)
        at 
org.apache.cassandra.index.sai.plan.StorageAttachedIndexSearcher$ResultRetriever.queryStorageAndFilter(StorageAttachedIndexSearcher.java:402)
        at 
org.apache.cassandra.index.sai.plan.StorageAttachedIndexSearcher$ResultRetriever.nextRowIterator(StorageAttachedIndexSearcher.java:206)
        at 
org.apache.cassandra.index.sai.plan.StorageAttachedIndexSearcher$ResultRetriever.computeNext(StorageAttachedIndexSearcher.java:186)
        at 
org.apache.cassandra.index.sai.plan.StorageAttachedIndexSearcher$ResultRetriever.computeNext(StorageAttachedIndexSearcher.java:136)
        at 
org.apache.cassandra.utils.AbstractIterator.hasNext(AbstractIterator.java:47)
        at 
org.apache.cassandra.index.sai.plan.VectorTopKProcessor.filter(VectorTopKProcessor.java:95)
        at 
org.apache.cassandra.index.sai.plan.StorageAttachedIndexSearcher.search(StorageAttachedIndexSearcher.java:127)
        at 
org.apache.cassandra.db.ReadCommand.executeLocally(ReadCommand.java:518)
        at 
org.apache.cassandra.db.AbstractReadQuery.executeInternal(AbstractReadQuery.java:65)
        at 
org.apache.cassandra.db.ReadCommand.executeInternal(ReadCommand.java:120)
        at 
org.apache.cassandra.cql3.statements.SelectStatement.executeInternal(SelectStatement.java:671)
        at 
org.apache.cassandra.cql3.statements.SelectStatement.executeLocally(SelectStatement.java:642)
        at 
org.apache.cassandra.cql3.statements.SelectStatement.executeLocally(SelectStatement.java:154)
        at 
org.apache.cassandra.cql3.QueryProcessor.executeInternal(QueryProcessor.java:494)
        at 
org.apache.cassandra.cql3.CQLTester.executeFormattedQuery(CQLTester.java:1752)
        at org.apache.cassandra.index.sai.SAITester.execute(SAITester.java:626)
        at 
org.apache.cassandra.index.sai.cql.VectorTypeTest.lwtTest(VectorTypeTest.java:395)
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
        at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
        at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
        at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
        at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
        at 
com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
        at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
        ... 20 more
{code}

> Avoid new ByteBuffer allocation for each NativeCell/NativeClustering during 
> flushing of offheap_objects memtable
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-20173
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-20173
>             Project: Apache Cassandra
>          Issue Type: Improvement
>          Components: Local/Memtable
>            Reporter: Dmitry Konstantinov
>            Assignee: Dmitry Konstantinov
>            Priority: Normal
>             Fix For: 5.x
>
>         Attachments: image-2024-12-29-13-06-13-115.png, 
> native_clustering_byte_buffer_alloc.png
>
>          Time Spent: 3h 50m
>  Remaining Estimate: 0h
>
> Currently for memtable_allocation_type: offheap_objects when we flush a 
> memtable we allocate new ByteBuffer object for each NativeCell and 
> NativeClustering to write it to disk. It is one of the main contributors 
> (together with CASSANDRA-20162) to memory allocation for MemtableFlushWriter 
> thread:
> !image-2024-12-29-13-06-13-115.png|width=570!
> !native_clustering_byte_buffer_alloc.png|width=570!
> Instead of retrieving of the value() as ByteBuffer we can introduce 
> NativeValueAccessor to not expose ByteBuffer + keep it inside NativeCell as a 
> thread-local to re-use. Same idea is applicable for NativeClustering
> Note: for Cassandra 4.x the situation is even worse because we clone very 
> BTreeRow from off-heap to heap due to using the same iterator as for usual 
> reads (where we need to protect against memtable lifecycle changes). In case 
> of flushing such protection is not needed. For TrieMemtable we skip such 
> cloning (CASSANDRA-17240, 
> [https://github.com/apache/cassandra/blob/cassandra-5.0/src/java/org/apache/cassandra/db/memtable/TrieMemtable.java#L393]).
>  It makes sense to consider such skipping for over types of memtable too..



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

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

Reply via email to