apache/cassandra · error · InvalidRequestException

read_repair must be set to 'NONE' for transiently…

Error message

read_repair must be set to 'NONE' for transiently replicated keyspaces

What it means

Thrown when copying a table whose keyspace uses transient replication (nodes holding only partial data) while the table's read_repair setting is not NONE. Read repair with transient replicas is unsupported, so the operation is rejected.

Solutions

  1. Set read_repair = 'NONE' in the copy's WITH options (or in the source table's schema)
  2. Remove transient replicas from the source keyspace replication (use full RF) if read repair is needed
  3. Copy into a non-transient keyspace

Example fix

// before
CREATE TABLE tgt.t AS src.t WITH read_repair = 'QUERY';
// after
CREATE TABLE tgt.t ... WITH read_repair = 'NONE';
Defensive patterns

Strategy: validation

Validate before calling

if (sourceKs.replicationStrategy.hasTransientReplicas())
    requireSetting("read_repair", "NONE"); // pass WITH read_repair = 'NONE' in the copy DDL

Try / catch

try { copyTable(...); }
catch (InvalidRequestException e) { if (e.getMessage().contains("read_repair must be set to 'NONE'")) retryWithReadRepairNone(); else throw e; }

Prevention

When it happens

Trigger: sourceKeyspaceMeta.replicationStrategy.hasTransientReplicas() is true (e.g. NetworkTopologyStrategy with per-DC RF written as <full>/<transient>) and sourceTableMeta.params.readRepair != NONE during CopyTableStatement.apply.

Common situations: Copying a table from a keyspace configured with transient replication where read_repair was left at default (AUTO) or set to QUERY.

Understand the failure class

Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.

Related errors


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

Appendix: source

Thrown at src/java/org/apache/cassandra/cql3/statements/schema/CopyTableStatement.java:200

        Guardrails.columnsPerTable.guard(sourceTableMeta.columns().size(), targetTableName, false, state);

        sourceTableMeta.columns().forEach(columnMetadata -> {
            if (columnMetadata.type.isVector())
            {
                Guardrails.vectorTypeEnabled.ensureEnabled(columnMetadata.name.toString(), state);
                int dimensions = ((VectorType) columnMetadata.type).dimension;
                Guardrails.vectorDimensions.guard(dimensions, columnMetadata.name.toString(), false, state);
            }
        });

        // Guardrail to check whether creation of new COMPACT STORAGE tables is allowed
        if (sourceTableMeta.isCompactTable())
            Guardrails.compactTablesEnabled.ensureEnabled(state);

        if (sourceKeyspaceMeta.replicationStrategy.hasTransientReplicas()
            && sourceTableMeta.params.readRepair != ReadRepairStrategy.NONE)
        {
            throw ire("read_repair must be set to 'NONE' for transiently replicated keyspaces");
        }

        if (!sourceTableMeta.params.compression.isEnabled())
            Guardrails.uncompressedTablesEnabled.ensureEnabled(state);

        // withInternals can be set to false as it is only used for source table id, which is not need for target table and the table
        // id can be set through create table like cql using WITH ID
        String sourceCQLString = sourceTableMeta.toCqlString(false, false, false, false);

        TableMetadata.Builder targetBuilder = CreateTableStatement.parse(sourceCQLString,
                                                                         targetKeyspace,
                                                                         targetTableName,
                                                                         sourceKeyspaceMeta.types,
                                                                         UserFunctions.none())
                                                                  .indexes(Indexes.none())
                                                                  .triggers(Triggers.none());

        // Copy requested features using the CreateLikeHandler pattern

View on GitHub (pinned to 88fd0f6a0e)