apache/cassandra · error · IllegalArgumentException
Unknown table %s.%s
Error message
Unknown table %s.%s
What it means
CommitLogReplayer.create() validates the table portion of a replay filter pair. The keyspace exists, but ks.getColumnFamilyStore(pair[1]) returns null, so create() throws IllegalArgumentException("Unknown table ks.tbl"). The replay list must reference a table that exists in the node's schema.
Source
Thrown at src/java/org/apache/cassandra/db/commitlog/CommitLogReplayer.java:432
COMMIT_LOG_REPLAY_LIST.getKey(),
String.join(".", pair)));
String keyspaceName = pair[0];
Keyspace ks = Schema.instance.getKeyspaceInstance(keyspaceName);
if (ks == null)
throw new IllegalArgumentException("Unknown keyspace " + keyspaceName);
if (pair.length == 1)
{
for (ColumnFamilyStore cfs : ks.getColumnFamilyStores())
toReplay.put(keyspaceName, cfs.name);
}
else
{
ColumnFamilyStore cfs = ks.getColumnFamilyStore(pair[1]);
if (cfs == null)
throw new IllegalArgumentException(format("Unknown table %s.%s", keyspaceName, pair[1]));
toReplay.put(keyspaceName, pair[1]);
}
}
if (toReplay.isEmpty())
logger.info("All tables will be included in commit log replay.");
else
logger.info("Tables to be replayed: {}", toReplay.asMap().toString());
return new CustomReplayFilter(toReplay);
}
}
private static class AlwaysReplayFilter extends ReplayFilter
{
public Iterable<PartitionUpdate> filter(Mutation mutation)
{View on GitHub (pinned to 88fd0f6a0e)
Solutions
- Verify the table name with DESCRIBE TABLES in the keyspace and correct the replay filter string.
- Restore the table schema before replaying commit logs.
- Use just the keyspace name (no :table) if replaying all its tables is acceptable.
- Check casing: unquoted table names are lowercased.
Example fix
// before -Dcassandra.commitlog_replay_files=ks1:Standrd1 // after -Dcassandra.commitlog_replay_files=ks1:standard1
Defensive patterns
Strategy: validation
Validate before calling
Keyspace ks = Schema.instance.getKeyspaceInstance(ksName);
if (ks != null && ks.getColumnFamilyStore(tblName) == null)
throw new IllegalArgumentException("Table not found before replay: " + ksName + "." + tblName); Try / catch
try {
CommitLogReplayer.create(...);
} catch (IllegalArgumentException e) {
if (e.getMessage().startsWith("Unknown table"))
logger.error("Replay filter references missing table: {}", e.getMessage());
throw e;
} Prevention
- Verify table names with DESCRIBE TABLES before writing replay filters
- Favor keyspace-only entries when whole-keyspace replay is acceptable
- Watch for dropped/renamed tables between crash and replay
When it happens
Trigger: Passing 'keyspace:table' in the commitlog replay filter where the table does not exist in that keyspace (dropped, renamed, or mistyped).
Common situations: Table dropped or renamed between crash and replay; typo in table name; specifying a table in a different keyspace; case mismatch on unquoted identifiers.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- Unknown keyspace
- Missing required directive CommitLogSync
- Missing value for commitlog_sync_group_window.
- Group sync specified, but commitlog_sync_period found. Only
- Missing value for commitlog_sync_period.
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/78aaa3c13dc980d4.
Report an issue: GitHub.