apache/cassandra · info
The " " virtual table is deprecated. Please, use either "…
Error message
The "%s" virtual table is deprecated. Please, use either "%s.batch_group", or "%s.type_histogram" virtual tables instead.
What it means
BatchMetricsTable.data() emits a ClientWarn deprecation notice when the deprecated per-batch virtual table is queried, telling the user to use '<keyspace>.batch_group' or '<keyspace>.type_histogram' instead. The query still returns the legacy metric rows; the warning is purely informational.
Solutions
- Rewrite queries to use the <keyspace>.batch_group virtual table.
- Use the <keyspace>.type_histogram virtual table for per-type batch partition histograms.
- Update monitoring tooling/dashboards to the new tables so warnings stop appearing.
Example fix
// before SELECT * FROM system_metrics.batch_metrics; // after SELECT * FROM system_metrics.batch_group; SELECT * FROM system_metrics.type_histogram;
Defensive patterns
Strategy: validation
Prevention
- Use system_metrics.batch_group and system_metrics.type_histogram in all new tooling.
- Grep monitoring configs for deprecated virtual table names during upgrades.
- Read release notes for virtual table deprecations.
When it happens
Trigger: Any SELECT against the deprecated batch metrics virtual table (system_metrics.batch_metrics / similar TABLE_NAME) triggers the warning string with the table and keyspace names interpolated.
Common situations: Monitoring scripts or dashboards written against the old virtual table after it was deprecated in favor of the newer grouped metrics tables; documentation or tutorials referencing the legacy table.
Understand the failure class
Background: "is deprecated and will be removed" — deprecation warnings for old API names, keywords, and options, and how to migrate before the removal release — this error's family across 29 libraries.
Related errors
- The " " virtual table is deprecated. Please, use…
- Invalid row " + row + " in table: " + countsMetricsTableName
- Invalid row " + row + " in table: " +…
- key ' ' is deprecated; should switch to
- Can only unset '" + name + "'
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/508941237d2ab98f.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/db/virtual/BatchMetricsTable.java:71
.partitioner(new LocalPartitioner(UTF8Type.instance))
.addPartitionKeyColumn("name", UTF8Type.instance)
.addRegularColumn(P50, DoubleType.instance)
.addRegularColumn(P99, DoubleType.instance)
.addRegularColumn(P999, DoubleType.instance)
.addRegularColumn(MAX, LongType.instance)
.build());
}
@Override
public DataSet data()
{
SimpleDataSet result = new SimpleDataSet(metadata());
BatchMetrics metrics = BatchStatement.metrics;
addRow(result, PARTITIONS_PER_LOGGED_BATCH, metrics.partitionsPerLoggedBatch.getSnapshot());
addRow(result, PARTITIONS_PER_UNLOGGED_BATCH, metrics.partitionsPerUnloggedBatch.getSnapshot());
addRow(result, PARTITIONS_PER_COUNTER_BATCH, metrics.partitionsPerCounterBatch.getSnapshot());
ClientWarn.instance.warn(String.format("The \"%s\" virtual table is deprecated. " +
"Please, use either \"%s.batch_group\", or \"%s.type_histogram\" " +
"virtual tables instead.",
TABLE_NAME, metadata.keyspace, metadata.keyspace));
return result;
}
private void addRow(SimpleDataSet dataSet, String name, Snapshot snapshot)
{
dataSet.row(name)
.column(P50, snapshot.getMedian())
.column(P99, snapshot.get99thPercentile())
.column(P999, snapshot.get999thPercentile())
.column(MAX, snapshot.getMax());
}
}
View on GitHub (pinned to 88fd0f6a0e)