[ https://issues.apache.org/jira/browse/CASSANDRA-20855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18016502#comment-18016502 ]
Stefan Miklosovic commented on CASSANDRA-20855: ----------------------------------------------- [CASSANDRA-20855-4.1|https://github.com/instaclustr/cassandra/tree/CASSANDRA-20855-4.1] {noformat} java11_pre-commit_tests ✓ j11_build 2m 46s ✓ j11_cqlsh_dtests_py3 5m 43s ✓ j11_cqlsh_dtests_py311 6m 15s ✓ j11_cqlsh_dtests_py3_vnode 6m 6s ✓ j11_cqlshlib_cython_tests 9m 30s ✓ j11_cqlshlib_tests 8m 25s ✓ j11_dtests_vnode 40m 32s ✓ j11_jvm_dtests 15m 8s ✓ j11_unit_tests 9m 38s ✓ j11_unit_tests_repeat 1m 44s j11_dtests 20m 51s ✕ j11_cqlsh_dtests_py311_vnode 6m 29s cql_tracing_test.TestCqlTracing test_tracing_unknown_impl ✕ j11_cqlsh_dtests_py38 5m 55s cql_tracing_test.TestCqlTracing test_tracing_unknown_impl ✕ j11_cqlsh_dtests_py38_vnode 6m 10s cql_tracing_test.TestCqlTracing test_tracing_unknown_impl ✕ j11_jvm_dtests_vnode 14m 7s junit.framework.TestSuite org.apache.cassandra.distributed.test.CASMultiDCTest {noformat} [java11_pre-commit_tests|https://app.circleci.com/pipelines/github/instaclustr/cassandra/5991/workflows/f8bcdc54-8eff-4d52-9e14-d3402fb345cc] > sstablemetadata throws IndexOutOfBoundsException if maxClustering is not a > full clustering key > ---------------------------------------------------------------------------------------------- > > Key: CASSANDRA-20855 > URL: https://issues.apache.org/jira/browse/CASSANDRA-20855 > Project: Apache Cassandra > Issue Type: Bug > Components: Tool/sstable > Reporter: Dmitry Konstantinov > Assignee: Dmitry Konstantinov > Priority: Normal > Fix For: 4.0.x, 4.1.x > > Time Spent: 20m > Remaining Estimate: 0h > > In some cases we may get IndexOutOfBoundsException: > {code} > ./tools/bin/sstablemetadata > /cassandra/data/keyspace/table-1707f6907c6e11f0b1fabf128b8d57a9/nb-5-big-Data.db > > SSTable: > /cassandra/data/keyspace/table-1707f6907c6e11f0b1fabf128b8d57a9/nb-5-big > Partitioner: org.apache.cassandra.dht.Murmur3Partitioner > Bloom Filter FP chance: 0.1 > Minimum timestamp: 1755556756403000 (08/18/2025 18:39:16) > Maximum timestamp: 1755776375237088 (08/21/2025 07:39:35) > SSTable min local deletion time: 1755774034 (08/21/2025 07:00:34) > SSTable max local deletion time: 2147483647 (no tombstones) > Compressor: org.apache.cassandra.io.compress.LZ4Compressor > Compression ratio: 0.3084167695600824 > TTL min: 0 > TTL max: 5263998 (60 days 22 hours 13 minutes 18 seconds) > First token: -9218140013640741760 (1:5129229) > Last token: 9191231194481845151 (1:971548616326) > Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 1, > Size: 1 > at java.util.ArrayList.rangeCheck(ArrayList.java:659) > at java.util.ArrayList.get(ArrayList.java:435) > at > org.apache.cassandra.tools.SSTableMetadataViewer.printSStableMetadata(SSTableMetadataViewer.java:369) > at > org.apache.cassandra.tools.SSTableMetadataViewer.main(SSTableMetadataViewer.java:548) > {code} > In this logic we have an implicit assumption that number of values in > maxClusteringValues is always the same as for minClusteringValues but it is > not true. For example, when we have a range tombstone: > {code} > List<AbstractType<?>> clusteringTypes = header.getClusteringTypes(); > List<ByteBuffer> minClusteringValues = stats.minClusteringValues; > List<ByteBuffer> maxClusteringValues = stats.maxClusteringValues; > String[] minValues = new String[clusteringTypes.size()]; > String[] maxValues = new String[clusteringTypes.size()]; > for (int i = 0; i < clusteringTypes.size(); i++) > { > minValues[i] = > clusteringTypes.get(i).getString(minClusteringValues.get(i)); > maxValues[i] = > clusteringTypes.get(i).getString(maxClusteringValues.get(i)); // issue is > here <========== > } > field("minClusteringValues", Arrays.toString(minValues)); > field("maxClusteringValues", Arrays.toString(maxValues)); > {code} -- 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