Add speculative retries to tablestats

Patch by brandonwilliams; reviewed by bereng and Maxwell Guo for
CASSANDRA-18767
This commit is contained in:
Brandon Williams 2023-08-16 10:38:28 -05:00
parent e08bf19432
commit fd9f07dab8
2 changed files with 2 additions and 0 deletions

View File

@ -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)

View File

@ -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;