{"record":{"id":"373a48d342c9971c","repo":"apache/cassandra","slug":"timeout-type-requires-one-of-read-range-write","errorCode":null,"errorMessage":"Timeout type requires one of (read, range, write, counterwrite, cascontention, truncate, internodeconnect, internodeuser, internodestreaminguser, misc (general rpc_timeout_in_ms))","messagePattern":"Timeout type requires one of \\(read, range, write, counterwrite, cascontention, truncate, internodeconnect, internodeuser, internodestreaminguser, misc \\(general rpc_timeout_in_ms\\)\\)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/tools/NodeProbe.java","lineNumber":1635,"sourceCode":"                return ssProxy.getReadRpcTimeout();\n            case \"range\":\n                return ssProxy.getRangeRpcTimeout();\n            case \"write\":\n                return ssProxy.getWriteRpcTimeout();\n            case \"counterwrite\":\n                return ssProxy.getCounterWriteRpcTimeout();\n            case \"cascontention\":\n                return ssProxy.getCasContentionTimeout();\n            case \"truncate\":\n                return ssProxy.getTruncateRpcTimeout();\n            case \"internodeconnect\":\n                return ssProxy.getInternodeTcpConnectTimeoutInMS();\n            case \"internodeuser\":\n                return ssProxy.getInternodeTcpUserTimeoutInMS();\n            case \"internodestreaminguser\":\n                return ssProxy.getInternodeStreamingTcpUserTimeoutInMS();\n            default:\n                throw new RuntimeException(\"Timeout type requires one of (\" + GetTimeout.TIMEOUT_TYPES + \")\");\n        }\n    }\n\n    /** @deprecated See CASSANDRA-17225 */\n    @Deprecated(since = \"4.1\")\n    public int getStreamThroughput()\n    {\n        return ssProxy.getStreamThroughputMbitPerSec();\n    }\n\n    public double getStreamThroughputAsDouble()\n    {\n        return ssProxy.getStreamThroughputMbitPerSecAsDouble();\n    }\n\n    /** @deprecated See CASSANDRA-17225 */\n    @Deprecated(since = \"4.1\")\n    public int getInterDCStreamThroughput()","sourceCodeStart":1617,"sourceCodeEnd":1653,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/tools/NodeProbe.java#L1617-L1653","documentation":"NodeProbe.getTimeout(String type) validates the timeout-type argument against the fixed set of known types (read, range, write, counterwrite, cascontention, truncate, internodeconnect, internodeuser, internodestreaminguser, misc) and throws for anything unrecognized in the default switch branch. This is a CLI argument validation error surfaced to `nodetool gettimeout` users.","triggerScenarios":"Running `nodetool gettimeout <badtype>`, e.g. a misspelled or unsupported type like 'read_timeout', 'cas', or a type added only in newer versions.","commonSituations":"Typo in timeout type name; following outdated documentation or scripts written for a different Cassandra version where a type did not exist (e.g. internodeconnect added later).","solutions":["Use exactly one of the listed types: read, range, write, counterwrite, cascontention, truncate, internodeconnect, internodeuser, internodestreaminguser, misc","Check `nodetool help gettimeout` for the types supported by your version","Use 'misc' for the general rpc_timeout_in_ms"],"exampleFix":"// before\nprobe.getTimeout(\"write_timeout\");\n// after\nprobe.getTimeout(\"write\");","handlingStrategy":"validation","validationCode":"java.util.Set<String> VALID = Set.of(\"read\",\"range\",\"write\",\"counterwrite\",\"cascontention\",\"truncate\",\"internodeconnect\",\"internodeuser\",\"internodestreaminguser\",\"misc\");\nif (!VALID.contains(type)) throw new IllegalArgumentException(\"Invalid timeout type: \" + type);","typeGuard":null,"tryCatchPattern":"try { probe.getTimeout(type); } catch (RuntimeException e) { System.err.println(\"Valid types: \" + VALID); }","preventionTips":["Validate the type string against GetTimeout.TIMEOUT_TYPES before calling","Match exact lowercase spelling and casing","Confirm supported types via nodetool help gettimeout for your version"],"tags":["nodetool","cli-argument","timeout","enum"],"backgroundTag":"invalid-enum-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"}