From fd9f07dab863a93008180bcd1c6e207dee48e2a7 Mon Sep 17 00:00:00 2001 From: Brandon Williams Date: Wed, 16 Aug 2023 10:38:28 -0500 Subject: [PATCH] Add speculative retries to tablestats Patch by brandonwilliams; reviewed by bereng and Maxwell Guo for CASSANDRA-18767 --- CHANGES.txt | 1 + src/java/org/apache/cassandra/tools/nodetool/TableStats.java | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 7f722c8928..ea9b1024e3 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 3.0.30 + * Fix missing speculative retries in tablestats (CASSANDRA-18767) * Fix Requires for Java for RPM package (CASSANDRA-18751) * Fix CQLSH online help topic link (CASSANDRA-17534) * Remove unused suppressions (CASSANDRA-18724) diff --git a/src/java/org/apache/cassandra/tools/nodetool/TableStats.java b/src/java/org/apache/cassandra/tools/nodetool/TableStats.java index ea46d6e2aa..48f650775c 100644 --- a/src/java/org/apache/cassandra/tools/nodetool/TableStats.java +++ b/src/java/org/apache/cassandra/tools/nodetool/TableStats.java @@ -200,6 +200,7 @@ public class TableStats extends NodeToolCmd if (memtableOffHeapSize != null) out.println("\t\tMemtable off heap memory used: " + format(memtableOffHeapSize, humanReadable)); out.println("\t\tMemtable switch count: " + probe.getColumnFamilyMetric(keyspaceName, tableName, "MemtableSwitchCount")); + out.println("\t\tSpeculate retries: " + probe.getColumnFamilyMetric(keyspaceName, tableName, "SpeculativeRetries")); out.println("\t\tLocal read count: " + ((CassandraMetricsRegistry.JmxTimerMBean) probe.getColumnFamilyMetric(keyspaceName, tableName, "ReadLatency")).getCount()); double localReadLatency = ((CassandraMetricsRegistry.JmxTimerMBean) probe.getColumnFamilyMetric(keyspaceName, tableName, "ReadLatency")).getMean() / 1000; double localRLatency = localReadLatency > 0 ? localReadLatency : Double.NaN;