Merge branch 'cassandra-4.1' into cassandra-5.0

This commit is contained in:
Brandon Williams 2023-08-18 05:11:53 -05:00
commit 0b593776d5
6 changed files with 14 additions and 0 deletions

View File

@ -186,6 +186,7 @@ Merged from 4.0:
* Partial compaction can resurrect deleted data (CASSANDRA-18507)
Merged from 3.11:
Merged from 3.0:
* 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

@ -44,6 +44,7 @@ public class StatsTable
public boolean memtableOffHeapUsed = false;
public String memtableOffHeapMemoryUsed;
public Object memtableSwitchCount;
public Object speculativeRetries;
public long localReadCount;
public double localReadLatencyMs;
public long localWriteCount;

View File

@ -135,6 +135,7 @@ public class TableStatsHolder implements StatsHolder
if (table.memtableOffHeapUsed)
mpTable.put("memtable_off_heap_memory_used", table.memtableOffHeapMemoryUsed);
mpTable.put("memtable_switch_count", table.memtableSwitchCount);
mpTable.put("speculative_retries", table.speculativeRetries);
mpTable.put("local_read_count", table.localReadCount);
mpTable.put("local_read_latency_ms", String.format("%01.3f", table.localReadLatencyMs));
mpTable.put("local_write_count", table.localWriteCount);
@ -329,6 +330,7 @@ public class TableStatsHolder implements StatsHolder
statsTable.memtableOffHeapMemoryUsed = format(memtableOffHeapSize, humanReadable);
}
statsTable.memtableSwitchCount = probe.getColumnFamilyMetric(keyspaceName, tableName, "MemtableSwitchCount");
statsTable.speculativeRetries = probe.getColumnFamilyMetric(keyspaceName, tableName, "SpeculativeRetries");
statsTable.localReadCount = ((CassandraMetricsRegistry.JmxTimerMBean) probe.getColumnFamilyMetric(keyspaceName, tableName, "ReadLatency")).getCount();
double localReadLatency = ((CassandraMetricsRegistry.JmxTimerMBean) probe.getColumnFamilyMetric(keyspaceName, tableName, "ReadLatency")).getMean() / 1000;

View File

@ -110,6 +110,7 @@ public class TableStatsPrinter<T extends StatsHolder>
if (table.memtableOffHeapUsed)
out.println(indent + "Memtable off heap memory used: " + table.memtableOffHeapMemoryUsed);
out.println(indent + "Memtable switch count: " + table.memtableSwitchCount);
out.println(indent + "Speculative retries: " + table.speculativeRetries);
out.println(indent + "Local read count: " + table.localReadCount);
out.printf(indent + "Local read latency: %01.3f ms%n", table.localReadLatencyMs);
out.println(indent + "Local write count: " + table.localWriteCount);

View File

@ -48,6 +48,7 @@ public class TableStatsPrinterTest extends TableStatsTestBase
"\tMemtable cell count: 111\n" +
"\tMemtable data size: 0\n" +
"\tMemtable switch count: 1\n" +
"\tSpeculative retries: 0\n" +
"\tLocal read count: 0\n" +
"\tLocal read latency: 2.000 ms\n" +
"\tLocal write count: 5\n" +
@ -86,6 +87,7 @@ public class TableStatsPrinterTest extends TableStatsTestBase
"\tMemtable data size: 900\n" +
"\tMemtable off heap memory used: 314159265\n" +
"\tMemtable switch count: 22222\n" +
"\tSpeculative retries: 0\n" +
"\tLocal read count: 1\n" +
"\tLocal read latency: 3.000 ms\n" +
"\tLocal write count: 4\n" +
@ -125,6 +127,7 @@ public class TableStatsPrinterTest extends TableStatsTestBase
"\tMemtable cell count: 333333\n" +
"\tMemtable data size: 1999\n" +
"\tMemtable switch count: 3333\n" +
"\tSpeculative retries: 0\n" +
"\tLocal read count: 2\n" +
"\tLocal read latency: 4.000 ms\n" +
"\tLocal write count: 3\n" +
@ -163,6 +166,7 @@ public class TableStatsPrinterTest extends TableStatsTestBase
"\tMemtable data size: 3000\n" +
"\tMemtable off heap memory used: 141421356\n" +
"\tMemtable switch count: 444444\n" +
"\tSpeculative retries: 0\n" +
"\tLocal read count: 3\n" +
"\tLocal read latency: NaN ms\n" +
"\tLocal write count: 2\n" +
@ -202,6 +206,7 @@ public class TableStatsPrinterTest extends TableStatsTestBase
"\tMemtable cell count: 55555\n" +
"\tMemtable data size: 20000\n" +
"\tMemtable switch count: 5\n" +
"\tSpeculative retries: 0\n" +
"\tLocal read count: 4\n" +
"\tLocal read latency: 0.000 ms\n" +
"\tLocal write count: 1\n" +
@ -240,6 +245,7 @@ public class TableStatsPrinterTest extends TableStatsTestBase
"\tMemtable data size: 1000000\n" +
"\tMemtable off heap memory used: 161803398\n" +
"\tMemtable switch count: 6\n" +
"\tSpeculative retries: 0\n" +
"\tLocal read count: 5\n" +
"\tLocal read latency: 1.000 ms\n" +
"\tLocal write count: 0\n" +
@ -412,6 +418,7 @@ public class TableStatsPrinterTest extends TableStatsTestBase
" \"twcs\" : null,\n" +
" \"bytes_pending_repair\" : 0,\n" +
" \"memtable_switch_count\" : 6,\n" +
" \"speculative_retries\" : 0,\n" +
" \"maximum_tombstones_per_slice_last_five_minutes\" : 6,\n" +
" \"memtable_cell_count\" : 6666,\n" +
" \"memtable_data_size\" : \"1000000\",\n" +
@ -480,6 +487,7 @@ public class TableStatsPrinterTest extends TableStatsTestBase
" twcs: null\n" +
" bytes_pending_repair: 0\n" +
" memtable_switch_count: 6\n" +
" speculative_retries: 0\n" +
" maximum_tombstones_per_slice_last_five_minutes: 6\n" +
" memtable_cell_count: 6666\n" +
" memtable_data_size: '1000000'\n" +

View File

@ -82,6 +82,7 @@ public class TableStatsTestBase
template.memtableCellCount = 0L;
template.memtableDataSize = "0";
template.memtableSwitchCount = 0L;
template.speculativeRetries = 0L;
template.localReadCount =0L;
template.localReadLatencyMs = Double.NaN;
template.localWriteCount = 0L;