apache/cassandra · info

The " " virtual table is deprecated. Please, use…

Error message

The "%s" virtual table is deprecated. Please, use "system_metrics.cql_group" virtual table instead.

What it means

CQLMetricsTable.data() emits a ClientWarn deprecation notice whenever the deprecated CQL metrics virtual table is read, pointing users to the 'system_metrics.cql_group' virtual table. The legacy rows are still returned; this is an informational notice only.

Solutions

  1. Migrate queries to the system_metrics.cql_group virtual table.
  2. Update dashboards/scripts referencing the deprecated table name.
  3. Ignore the warning if intentional temporary use of the legacy table is required; it does not alter results.

Example fix

// before
SELECT * FROM system_metrics.cql_metrics;

// after
SELECT * FROM system_metrics.cql_group;
Defensive patterns

Strategy: validation

Prevention

When it happens

Trigger: Any SELECT against the deprecated CQL metrics virtual table (e.g. system_metrics.cql_metrics) — prepared-statement and regular-statement metric rows are returned along with the warning.

Common situations: Older dashboards or ops runbooks querying cql_metrics after its replacement shipped; automation that still reads preparedStatementsRatio etc. from 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


AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10). Data as JSON: /api/errors/fb0173c5c348c86f. Report an issue: GitHub.

Appendix: source

Thrown at src/java/org/apache/cassandra/db/virtual/CQLMetricsTable.java:78

                           .kind(TableMetadata.Kind.VIRTUAL)
                           .partitioner(new LocalPartitioner(UTF8Type.instance))
                           .addPartitionKeyColumn(NAME_COL, UTF8Type.instance)
                           .addRegularColumn(VALUE_COL, DoubleType.instance)
                           .build());
        this.cqlMetrics = cqlMetrics;
    }

    @Override
    public DataSet data()
    {
        SimpleDataSet result = new SimpleDataSet(metadata());
        addRow(result, PREPARED_STATEMENTS_COUNT, cqlMetrics.preparedStatementsCount.getValue());
        addRow(result, PREPARED_STATEMENTS_EVICTED, cqlMetrics.preparedStatementsEvicted.getCount());
        addRow(result, PREPARED_STATEMENTS_EXECUTED, cqlMetrics.preparedStatementsExecuted.getCount());
        addRow(result, PREPARED_STATEMENTS_RATIO, cqlMetrics.preparedStatementsRatio.getValue());
        addRow(result, REGULAR_STATEMENTS_EXECUTED, cqlMetrics.regularStatementsExecuted.getCount());

        ClientWarn.instance.warn("The \"" + TABLE_NAME + "\" virtual table is deprecated. " +
                                 "Please, use \"system_metrics.cql_group\" virtual table instead.");
        return result;
    }

    private void addRow(SimpleDataSet dataSet, String name, double value)
    {
        dataSet.row(name)
               .column(VALUE_COL, value);
    }
}

View on GitHub (pinned to 88fd0f6a0e)