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

  1. Verify the table name with DESCRIBE TABLES in the keyspace and correct the replay filter string.
  2. Restore the table schema before replaying commit logs.
  3. Use just the keyspace name (no :table) if replaying all its tables is acceptable.
  4. 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

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


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