apache/cassandra · error · InvalidRequestException

Cannot update '" + name + "'

Error message

Cannot update '" + name + "'

What it means

The accord_debug tracing table's update path validates each SET column against a fixed whitelist (bucket_mode, chance, managed_by_pattern, bucket_size, bucket_sub_size, ...). Any other column name hits the default branch and throws InvalidRequestException 'Cannot update <name>'.

Source

Thrown at src/java/org/apache/cassandra/db/virtual/AccordDebugKeyspace.java:1163

            TxnId txnId = TxnId.parse((String)partitionKeys[0]);
            tracing().stopTracing(txnId);
        }

        @Override
        protected void applyRowUpdate(Object[] partitionKeys, @Nullable Object[] clusteringKeys, ColumnMetadata[] columns, Object[] values)
        {
            TxnId txnId = TxnId.parse((String)partitionKeys[0]);
            CoordinationKinds newTrace = null;
            BucketMode newBucketMode = null;
            boolean unsetManagedByOwner = false;
            int newBucketSize = -1, newBucketSubSize = -1, newBucketSeen = -1;
            float newChance = Float.NaN;
            for (int i = 0 ; i < columns.length ; ++i)
            {
                String name = columns[i].name.toString();
                switch (name)
                {
                    default: throw new InvalidRequestException("Cannot update '" + name + '\'');
                    case "bucket_mode":
                        newBucketMode = checkBucketMode(values[i]);
                        break;
                    case "chance":
                        newChance = checkChance(values[i], name);
                        break;
                    case "managed_by_pattern":
                        if (values[i] != null && (Boolean)values[i])
                            throw new InvalidRequestException("Can only unset '" + name + '\'');
                        unsetManagedByOwner = true;
                        break;
                    case "bucket_size":
                        newBucketSize = checkNonNegative(values[i], name, 0);
                        break;
                    case "bucket_sub_size":
                        newBucketSubSize = checkNonNegative(values[i], name, 0);
                        break;
                    case "bucket_seen":

View on GitHub (pinned to 88fd0f6a0e)

Solutions

  1. Use only the supported columns in the SET clause: bucket_mode, chance, managed_by_pattern, bucket_size, bucket_sub_size (per this table's schema).
  2. Check the table definition (DESCRIBE TABLE system_views.accord_debug_tracing) before writing the UPDATE.
  3. Fix any typos in column names.
  4. Do not attempt to update primary key columns.

Example fix

// before
session.execute("UPDATE system_views.accord_debug_tracing SET chancey = 0.5 WHERE txn_id = '...'");
// after
session.execute("UPDATE system_views.accord_debug_tracing SET chance = 0.5 WHERE txn_id = '...'");
Defensive patterns

Strategy: validation

Validate before calling

java.util.Set<String> allowed = java.util.Set.of("bucket_mode", "chance", "managed_by_pattern", "bucket_size", "bucket_sub_size");
if (!allowed.containsAll(assignmentColumns)) throw new IllegalArgumentException("Unsupported columns: " + assignmentColumns);

Try / catch

try { session.execute(update); } catch (com.datastax.driver.core.exceptions.InvalidQueryException e) { if (e.getMessage().startsWith("Cannot update '")) { /* fix column list */ } else throw e; }

Prevention

When it happens

Trigger: Issuing 'UPDATE system_views.accord_debug_tracing SET <unknown_col> = ... WHERE txn_id = ...' with a column not in the switch, including partition/primary-key columns or mistyped column names.

Common situations: Typo in column name (e.g. 'chancey' instead of 'chance'); trying to update key columns like txn_id; copying UPDATE statements from other virtual tables with different columns.

Understand the failure class

Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.

Related errors


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