{"record":{"id":"f49e7627d48ec5ae","repo":"apache/cassandra","slug":"read-repair-must-be-set-to-none-for-transiently-f49e76","errorCode":null,"errorMessage":"read_repair must be set to 'NONE' for transiently replicated keyspaces","messagePattern":"read_repair must be set to 'NONE' for transiently replicated keyspaces","errorType":"validation","errorClass":"InvalidRequestException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/cql3/statements/schema/CopyTableStatement.java","lineNumber":200,"sourceCode":"        Guardrails.columnsPerTable.guard(sourceTableMeta.columns().size(), targetTableName, false, state);\n\n        sourceTableMeta.columns().forEach(columnMetadata -> {\n            if (columnMetadata.type.isVector())\n            {\n                Guardrails.vectorTypeEnabled.ensureEnabled(columnMetadata.name.toString(), state);\n                int dimensions = ((VectorType) columnMetadata.type).dimension;\n                Guardrails.vectorDimensions.guard(dimensions, columnMetadata.name.toString(), false, state);\n            }\n        });\n\n        // Guardrail to check whether creation of new COMPACT STORAGE tables is allowed\n        if (sourceTableMeta.isCompactTable())\n            Guardrails.compactTablesEnabled.ensureEnabled(state);\n\n        if (sourceKeyspaceMeta.replicationStrategy.hasTransientReplicas()\n            && sourceTableMeta.params.readRepair != ReadRepairStrategy.NONE)\n        {\n            throw ire(\"read_repair must be set to 'NONE' for transiently replicated keyspaces\");\n        }\n\n        if (!sourceTableMeta.params.compression.isEnabled())\n            Guardrails.uncompressedTablesEnabled.ensureEnabled(state);\n\n        // 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\n        // id can be set through create table like cql using WITH ID\n        String sourceCQLString = sourceTableMeta.toCqlString(false, false, false, false);\n\n        TableMetadata.Builder targetBuilder = CreateTableStatement.parse(sourceCQLString,\n                                                                         targetKeyspace,\n                                                                         targetTableName,\n                                                                         sourceKeyspaceMeta.types,\n                                                                         UserFunctions.none())\n                                                                  .indexes(Indexes.none())\n                                                                  .triggers(Triggers.none());\n\n        // Copy requested features using the CreateLikeHandler pattern","sourceCodeStart":182,"sourceCodeEnd":218,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/cql3/statements/schema/CopyTableStatement.java#L182-L218","documentation":"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.","triggerScenarios":"sourceKeyspaceMeta.replicationStrategy.hasTransientReplicas() is true (e.g. NetworkTopologyStrategy with per-DC RF written as <full>/<transient>) and sourceTableMeta.params.readRepair != NONE during CopyTableStatement.apply.","commonSituations":"Copying a table from a keyspace configured with transient replication where read_repair was left at default (AUTO) or set to QUERY.","solutions":["Set read_repair = 'NONE' in the copy's WITH options (or in the source table's schema)","Remove transient replicas from the source keyspace replication (use full RF) if read repair is needed","Copy into a non-transient keyspace"],"exampleFix":"// before\nCREATE TABLE tgt.t AS src.t WITH read_repair = 'QUERY';\n// after\nCREATE TABLE tgt.t ... WITH read_repair = 'NONE';","handlingStrategy":"validation","validationCode":"if (sourceKs.replicationStrategy.hasTransientReplicas())\n    requireSetting(\"read_repair\", \"NONE\"); // pass WITH read_repair = 'NONE' in the copy DDL","typeGuard":null,"tryCatchPattern":"try { copyTable(...); }\ncatch (InvalidRequestException e) { if (e.getMessage().contains(\"read_repair must be set to 'NONE'\")) retryWithReadRepairNone(); else throw e; }","preventionTips":["When using transient replication, default all tables in that keyspace to read_repair = 'NONE'","Check replication options (RF like 3/1) before designing table params","Document that transient keyspaces forbid non-NONE read repair"],"tags":["cql","replication","read-repair","transient-replication"],"backgroundTag":"invalid-config-value","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}