apache/cassandra · error · InvalidRequestException

Load CIDR groups cache operation not supported by %s

Error message

Load CIDR groups cache operation not supported by %s

What it means

Thrown by CreateViewStatement.validate when materialized views are disabled in the node configuration. Cassandra can be configured with materialized_views_enabled: false; in recent versions this is the default because MVs are considered experimental and operationally risky, so any CREATE MATERIALIZED VIEW is rejected with InvalidRequestException before further validation.

Source

Thrown at src/java/org/apache/cassandra/auth/AllowAllCIDRAuthorizer.java:58

        // Caches not created when CIDR authorization is disabled
    }

    @Override
    public boolean requireAuthorization()
    {
        return false;
    }

    @Override
    public boolean invalidateCidrPermissionsCache(String roleName)
    {
        throw new InvalidRequestException("Invalidate CIDR permissions cache operation not supported by " + getClass().getSimpleName());
    }

    @Override
    public void loadCidrGroupsCache()
    {
        throw new InvalidRequestException("Load CIDR groups cache operation not supported by " + getClass().getSimpleName());
    }

    @Override
    public Set<String> lookupCidrGroupsForIp(InetAddress ip)
    {
        throw new InvalidRequestException("'Get CIDR groups for IP' operation not supported by " + getClass().getSimpleName());
    }

    @Override
    public boolean hasAccessFromIp(RoleResource role, InetAddress ipAddress)
    {
        // Allow all accesses
        return true;
    }
}

View on GitHub (pinned to 88fd0f6a0e)

Solutions

  1. Set materialized_views_enabled: true in cassandra.yaml on every node and restart the cluster (rolling restart).
  2. Prefer denormalized tables maintained by the application or CDC over materialized views.
  3. If on 4.x+, evaluate the documented MV limitations/experimental status before enabling.

Example fix

// before (cassandra.yaml)
# materialized_views_enabled not set (defaults false)
// after (cassandra.yaml)
materialized_views_enabled: true
Defensive patterns

Strategy: fallback

Validate before calling

// config check (node-side)
boolean mvEnabled = DatabaseDescriptor.getMaterializedViewsEnabled(); // must be true

Try / catch

try {
    session.execute(createMvStmt);
} catch (InvalidQueryException e) {
    if (e.getMessage().contains("Materialized views are disabled")) {
        throw new ConfigurationException("Enable materialized_views_enabled in cassandra.yaml on all nodes");
    }
    throw e;
}

Prevention

When it happens

Trigger: Executing CREATE MATERIALIZED VIEW against a cluster whose cassandra.yaml does not set materialized_views_enabled: true (the default in Cassandra 4.0+).

Common situations: Upgrading from Cassandra 3.x where MVs were enabled by default to 4.x+ where they are disabled; fresh installs where the operator never enabled the experimental feature; scripts copied from older documentation.

Related errors


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