{"record":{"id":"be2c12f0bbb3b987","repo":"t8y2/dbx","slug":"unsupported-cassandra-reconnection-policy-s","errorCode":null,"errorMessage":"unsupported Cassandra reconnection policy: %s","messagePattern":"unsupported Cassandra reconnection policy: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"agents/drivers/cassandra-go/config.go","lineNumber":565,"sourceCode":"\t\t\tif err != nil || seconds < 0 {\n\t\t\t\treturn \"\", 0, 0, fmt.Errorf(\"invalid Cassandra reconnection policy delay: %s\", part)\n\t\t\t}\n\t\t\tif index == 0 {\n\t\t\t\tbaseDelay = time.Duration(seconds) * time.Second\n\t\t\t} else if index == 1 {\n\t\t\t\tmaxDelay = time.Duration(seconds) * time.Second\n\t\t\t} else {\n\t\t\t\treturn \"\", 0, 0, fmt.Errorf(\"too many Cassandra reconnection policy parameters\")\n\t\t\t}\n\t\t}\n\t}\n\tswitch policy {\n\tcase \"\", \"constantreconnectionpolicy\":\n\t\treturn \"constant\", baseDelay, baseDelay, nil\n\tcase \"exponentialreconnectionpolicy\":\n\t\treturn \"exponential\", baseDelay, maxDelay, nil\n\tdefault:\n\t\treturn \"\", 0, 0, fmt.Errorf(\"unsupported Cassandra reconnection policy: %s\", value)\n\t}\n}\n\nfunc simpleClassName(value string) string {\n\tvalue = strings.TrimSpace(value)\n\tprefix := value\n\tif open := strings.IndexByte(prefix, '('); open >= 0 {\n\t\tprefix = prefix[:open]\n\t}\n\tif dot := strings.LastIndexByte(prefix, '.'); dot >= 0 {\n\t\treturn value[dot+1:]\n\t}\n\treturn value\n}\n\nfunc applyRetryPolicies(cluster *gocql.ClusterConfig, config cassandraConfig) error {\n\tswitch config.retryPolicy {\n\tcase \"\":","sourceCodeStart":547,"sourceCodeEnd":583,"githubUrl":"https://github.com/t8y2/dbx/blob/c0390bff16418b651f4728520d99adf8ce48829a/agents/drivers/cassandra-go/config.go#L547-L583","documentation":"parseReconnectionPolicy only supports constant (ConstantReconnectionPolicy) and exponential (ExponentialReconnectionPolicy) reconnection policies. Any other policy class name is rejected with this error, echoing the original value.","triggerScenarios":"A reconnectionPolicy option whose simple class name is not ConstantReconnectionPolicy or ExponentialReconnectionPolicy (empty string maps to constant), from applyCassandraURLParams or applyJavaDriverHOCON.","commonSituations":"Configuring FixedReconnectionPolicy or a custom ReconnectionPolicy implementation, or typo-ing the class name.","solutions":["Use ConstantReconnectionPolicy(baseDelay, maxDelay) or ExponentialReconnectionPolicy(baseDelay, maxDelay)","Check the exact class name spelling; matching uses the simple lowercased class name","Remove the option to fall back to the default (constant) policy"],"exampleFix":"// before\nreconnectionPolicy = FixedReconnectionPolicy(1000, 10000)\n// after\nreconnectionPolicy = ExponentialReconnectionPolicy(1000, 10000)","handlingStrategy":"validation","validationCode":"var supportedReconnectPolicies = map[string]bool{\n\t\"\": true, \"constantreconnectionpolicy\": true, \"exponentialreconnectionpolicy\": true,\n}\nfunc validReconnectPolicy(v string) bool {\n\treturn supportedReconnectPolicies[strings.ToLower(strings.TrimSpace(v))]\n}","typeGuard":null,"tryCatchPattern":"if _, _, _, err := parseReconnectionPolicy(raw); err != nil {\n\treturn fmt.Errorf(\"%w; supported: ConstantReconnectionPolicy, ExponentialReconnectionPolicy\", err)\n}","preventionTips":["Use only Constant or Exponential reconnection policies","Verify exact class name spelling (simple name, any case)","Omit the option to accept the constant default"],"tags":["cassandra","config","reconnection-policy","unsupported-value"],"backgroundTag":"unsupported-config-value","analyzedSha":"c0390bff16418b651f4728520d99adf8ce48829a","analyzedAt":"2026-09-05T23:05:10.900Z","contentChangedAt":"2026-09-05T23:05:10.900Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}