Skip to content

Commit 792e823

Browse files
committed
Merge branch 'cassandra-4.0' into cassandra-4.1
2 parents 6c068b9 + 1c5286f commit 792e823

File tree

11 files changed

+83
-15
lines changed

11 files changed

+83
-15
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* IntrusiveStack.accumulate is not accumulating correctly (CASSANDRA-20670)
66
* Add nodetool get/setguardrailsconfig commands (CASSANDRA-19552)
77
Merged from 4.0:
8+
* Fix IndexOutOfBoundsException in sstablemetadata tool when a range tombstone is a max clustering value (CASSANDRA-20855)
89
* Update Jackson to 2.19.2 (CASSANDRA-20848)
910
* Update commons-lang3 to 3.18.0 (CASSANDRA-20849)
1011
* Add NativeTransportMaxConcurrentConnectionsPerIp to StorageProxyMBean (CASSANDRA-20642)

src/java/org/apache/cassandra/tools/SSTableMetadataViewer.java

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -356,21 +356,9 @@ private void printSStableMetadata(String fname, boolean scan) throws IOException
356356
if (validation != null && header != null)
357357
printMinMaxToken(descriptor, FBUtilities.newPartitioner(descriptor), header.getKeyType());
358358

359-
if (header != null && header.getClusteringTypes().size() == stats.minClusteringValues.size())
360-
{
361-
List<AbstractType<?>> clusteringTypes = header.getClusteringTypes();
362-
List<ByteBuffer> minClusteringValues = stats.minClusteringValues;
363-
List<ByteBuffer> maxClusteringValues = stats.maxClusteringValues;
364-
String[] minValues = new String[clusteringTypes.size()];
365-
String[] maxValues = new String[clusteringTypes.size()];
366-
for (int i = 0; i < clusteringTypes.size(); i++)
367-
{
368-
minValues[i] = clusteringTypes.get(i).getString(minClusteringValues.get(i));
369-
maxValues[i] = clusteringTypes.get(i).getString(maxClusteringValues.get(i));
370-
}
371-
field("minClusteringValues", Arrays.toString(minValues));
372-
field("maxClusteringValues", Arrays.toString(maxValues));
373-
}
359+
printClusteringValues(header, "minClusteringValues", stats.minClusteringValues);
360+
printClusteringValues(header, "maxClusteringValues", stats.maxClusteringValues);
361+
374362
field("Estimated droppable tombstones",
375363
stats.getEstimatedDroppableTombstoneRatio((int) (currentTimeMillis() / 1000) - this.gc));
376364
field("SSTable Level", stats.sstableLevel);
@@ -437,6 +425,21 @@ private void printSStableMetadata(String fname, boolean scan) throws IOException
437425
}
438426
}
439427

428+
private void printClusteringValues(SerializationHeader.Component header, String name, List<ByteBuffer> clusteringValues)
429+
{
430+
if (header != null && header.getClusteringTypes().size() >= clusteringValues.size())
431+
{
432+
List<AbstractType<?>> clusteringTypes = header.getClusteringTypes();
433+
int size = Math.min(clusteringTypes.size(), clusteringValues.size());
434+
String[] values = new String[size];
435+
for (int i = 0; i < size; i++)
436+
{
437+
values[i] = clusteringTypes.get(i).getString(clusteringValues.get(i));
438+
}
439+
field(name, Arrays.toString(values));
440+
}
441+
}
442+
440443
private void field(String field, Object value)
441444
{
442445
field(field, value, null);
47 Bytes
Binary file not shown.
83 Bytes
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3617993137
16 Bytes
Binary file not shown.
14 Bytes
Binary file not shown.
4.74 KB
Binary file not shown.
74 Bytes
Binary file not shown.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Data.db
2+
TOC.txt
3+
Digest.crc32
4+
Summary.db
5+
Filter.db
6+
Statistics.db
7+
CompressionInfo.db
8+
Index.db

0 commit comments

Comments
 (0)