apache/cassandra · error · InvalidRequestException
Can only unset '" + name + "'
Error message
Can only unset '" + name + "'
What it means
In the accord_debug tracing table update, the managed_by_pattern column can only be assigned false/NULL (i.e. unset). Setting it to true throws InvalidRequestException because 'managed by' ownership is derived, not user-assignable.
Source
Thrown at src/java/org/apache/cassandra/db/virtual/AccordDebugKeyspace.java:1172
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":
newBucketSeen = checkNonNegative(values[i], name, 0);
break;
case "trace_events":
newTrace = tryParseCoordinationKinds(values[i]);
break;
}
}
if (newBucketSize == 0)View on GitHub (pinned to 88fd0f6a0e)
Solutions
- Only SET managed_by_pattern = false (or NULL) to unset it; never assign true.
- To change bucketing management mode, set bucket_mode instead.
- Remove managed_by_pattern from generated UPDATE statements when the intent is enabling rather than unsetting.
- Inspect the table schema/docs to see which fields are settable.
Example fix
// before
session.execute("UPDATE system_views.accord_debug_tracing SET managed_by_pattern = true WHERE txn_id = '...'");
// after
session.execute("UPDATE system_views.accord_debug_tracing SET bucket_mode = '...' WHERE txn_id = '...'"); Defensive patterns
Strategy: validation
Validate before calling
if (isAssigningTrue("managed_by_pattern", update)) throw new IllegalArgumentException("managed_by_pattern can only be unset (false/null)"); Try / catch
try { session.execute(update); } catch (com.datastax.driver.core.exceptions.InvalidQueryException e) { if (e.getMessage().startsWith("Can only unset '")) { /* remove managed_by_pattern=true from SET clause */ } else throw e; } Prevention
- Only assign false/NULL to managed_by_pattern
- Use bucket_mode to change management behavior
- Review accord_debug table docs for settable fields
When it happens
Trigger: Executing 'UPDATE system_views.accord_debug_tracing SET managed_by_pattern = true WHERE txn_id = ...'; any write attempting to enable the managed_by flag on a trace.
Common situations: Assuming the debug table mirrors full internal tracing config and trying to toggle ownership on; scripted tuning that flips managed_by_pattern expecting it to enable management.
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
- metadata + " currently only supports querying single partiti
- Cannot update '" + name + "'
- Cannot filter this table by partial partition key
- Modification is not supported by table " + metadata
- Unknown keyspace: '" + keyspaceName + "'
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/0c2afcb65040da4b.
Report an issue: GitHub.