{"record":{"id":"0c2afcb65040da4b","repo":"apache/cassandra","slug":"can-only-unset-name","errorCode":null,"errorMessage":"Can only unset '\" + name + \"'","messagePattern":"Can only unset '\" \\+ name \\+ \"'","errorType":"validation","errorClass":"InvalidRequestException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/db/virtual/AccordDebugKeyspace.java","lineNumber":1172,"sourceCode":"            BucketMode newBucketMode = null;\n            boolean unsetManagedByOwner = false;\n            int newBucketSize = -1, newBucketSubSize = -1, newBucketSeen = -1;\n            float newChance = Float.NaN;\n            for (int i = 0 ; i < columns.length ; ++i)\n            {\n                String name = columns[i].name.toString();\n                switch (name)\n                {\n                    default: throw new InvalidRequestException(\"Cannot update '\" + name + '\\'');\n                    case \"bucket_mode\":\n                        newBucketMode = checkBucketMode(values[i]);\n                        break;\n                    case \"chance\":\n                        newChance = checkChance(values[i], name);\n                        break;\n                    case \"managed_by_pattern\":\n                        if (values[i] != null && (Boolean)values[i])\n                            throw new InvalidRequestException(\"Can only unset '\" + name + '\\'');\n                        unsetManagedByOwner = true;\n                        break;\n                    case \"bucket_size\":\n                        newBucketSize = checkNonNegative(values[i], name, 0);\n                        break;\n                    case \"bucket_sub_size\":\n                        newBucketSubSize = checkNonNegative(values[i], name, 0);\n                        break;\n                    case \"bucket_seen\":\n                        newBucketSeen = checkNonNegative(values[i], name, 0);\n                        break;\n                    case \"trace_events\":\n                        newTrace = tryParseCoordinationKinds(values[i]);\n                        break;\n                }\n            }\n\n            if (newBucketSize == 0)","sourceCodeStart":1154,"sourceCodeEnd":1190,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/db/virtual/AccordDebugKeyspace.java#L1154-L1190","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before\nsession.execute(\"UPDATE system_views.accord_debug_tracing SET managed_by_pattern = true WHERE txn_id = '...'\");\n// after\nsession.execute(\"UPDATE system_views.accord_debug_tracing SET bucket_mode = '...' WHERE txn_id = '...'\");","handlingStrategy":"validation","validationCode":"if (isAssigningTrue(\"managed_by_pattern\", update)) throw new IllegalArgumentException(\"managed_by_pattern can only be unset (false/null)\");","typeGuard":null,"tryCatchPattern":"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; }","preventionTips":["Only assign false/NULL to managed_by_pattern","Use bucket_mode to change management behavior","Review accord_debug table docs for settable fields"],"tags":["virtual-table","accord","invalid-request","cassandra","validation"],"backgroundTag":"invalid-argument-value","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}