apache/cassandra · error · InvalidRequestException
Storage-attached index does not support the following IParti
Error message
Storage-attached index does not support the following IPartitioner implementations:
What it means
StorageAttachedIndex.validateOptions throws InvalidRequestException when the table's partitioner class is in ILLEGAL_PARTITIONERS (partitioners SAI cannot support). SAI requires partitioners with compatible token ordering/hashing; unsupported ones are rejected at CREATE INDEX time.
Source
Thrown at src/java/org/apache/cassandra/index/sai/StorageAttachedIndex.java:243
{
Map<String, String> unknown = new HashMap<>(2);
for (Map.Entry<String, String> option : options.entrySet())
{
if (!VALID_OPTIONS.contains(option.getKey()))
{
unknown.put(option.getKey(), option.getValue());
}
}
if (!unknown.isEmpty())
{
return unknown;
}
if (ILLEGAL_PARTITIONERS.contains(metadata.partitioner.getClass()))
{
throw new InvalidRequestException("Storage-attached index does not support the following IPartitioner implementations: " + ILLEGAL_PARTITIONERS);
}
String targetColumn = options.get(IndexTarget.TARGET_OPTION_NAME);
if (targetColumn == null)
{
throw new InvalidRequestException("Missing target column");
}
if (targetColumn.split(",").length > 1)
{
throw new InvalidRequestException("A storage-attached index cannot be created over multiple columns: " + targetColumn);
}
Pair<ColumnMetadata, IndexTarget.Type> target = TargetParser.parse(metadata, targetColumn);
if (target == null)
{View on GitHub (pinned to 88fd0f6a0e)
Solutions
- Use Murmur3Partitioner (the default) for the table/cluster and recreate data if needed
- Fall back to a legacy secondary index (CassandraIndex) instead of SAI on that cluster
- Remove the SAI index definition from tables with unsupported partitioners
Example fix
// before CREATE TABLE data(key text PRIMARY KEY ...) WITH partitioner = 'ByteOrderedPartitioner'; CREATE CUSTOM INDEX ... USING 'StorageAttachedIndex'; // after CREATE TABLE data(key text PRIMARY KEY ...); // default Murmur3Partitioner CREATE CUSTOM INDEX ... USING 'StorageAttachedIndex';
Defensive patterns
Strategy: validation
Validate before calling
if (ILLEGAL_PARTITIONERS.contains(metadata.partitioner.getClass())) throw new IllegalStateException("SAI unsupported partitioner: " + metadata.partitioner.getClass()); Try / catch
try { session.execute(createSaiIndex); } catch (InvalidRequestException e) { if (e.getMessage().contains("IPartitioner")) { /* use legacy index or migrate partitioner */ } else throw e; } Prevention
- Use Murmur3Partitioner (default) for all new tables
- Check cluster partitioner before adopting SAI
- Never use ByteOrdered/Random partitioner for new deployments
When it happens
Trigger: CREATE CUSTOM INDEX USING 'StorageAttachedIndex' on a table whose partitioner is one of the unsupported IPartitioner implementations (e.g. RandomPartitioner, ByteOrderedPartitioner or other legacy/custom partitioners).
Common situations: Legacy clusters using ByteOrderedPartitioner or RandomPartitioner; migrating schema to a cluster with a non-Murmur partitioner; tests with custom partitioners.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- Missing target column
- A storage-attached index cannot be created over multiple col
- Failed to retrieve target column for:
- %s doesn't support %s
- All arguments must have the same vector dimensions
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/3f38d16d8cc69036.
Report an issue: GitHub.