{"record":{"id":"c2b870e83011b067","repo":"apache/cassandra","slug":"native-transport-min-backoff-on-queue-overload-sho-c2b870","errorCode":null,"errorMessage":"native_transport_min_backoff_on_queue_overload should be positive","messagePattern":"native_transport_min_backoff_on_queue_overload should be positive","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/config/DatabaseDescriptor.java","lineNumber":2852,"sourceCode":"        conf.native_transport_queue_max_item_age_threshold = threshold;\n    }\n\n    public static long getNativeTransportMinBackoffOnQueueOverload(TimeUnit timeUnit)\n    {\n        return conf.native_transport_min_backoff_on_queue_overload.to(timeUnit);\n    }\n\n    public static long getNativeTransportMaxBackoffOnQueueOverload(TimeUnit timeUnit)\n    {\n        return conf.native_transport_max_backoff_on_queue_overload.to(timeUnit);\n    }\n\n    public static void setNativeTransportBackoffOnQueueOverload(long minBackoffMillis,\n                                                                long maxBackoffMillis,\n                                                                TimeUnit timeUnit)\n    {\n        if (minBackoffMillis <= 0)\n            throw new IllegalArgumentException(\"native_transport_min_backoff_on_queue_overload should be positive\");\n\n        if (minBackoffMillis >= maxBackoffMillis)\n            throw new IllegalArgumentException(String.format(\"native_transport_max_backoff_on_queue_overload should be greater than native_transport_min_backoff_on_queue_overload, but %s >= %s\", minBackoffMillis, maxBackoffMillis));\n\n\n        conf.native_transport_min_backoff_on_queue_overload = new DurationSpec.LongMillisecondsBound(minBackoffMillis, timeUnit);\n        conf.native_transport_max_backoff_on_queue_overload = new DurationSpec.LongMillisecondsBound(maxBackoffMillis, timeUnit);\n    }\n\n    private static long native_transport_timeout_nanos_cached = -1;\n\n    public static long getNativeTransportTimeout(TimeUnit timeUnit)\n    {\n        if (timeUnit == TimeUnit.NANOSECONDS)\n        {\n            if (native_transport_timeout_nanos_cached == -1)\n                native_transport_timeout_nanos_cached = conf.native_transport_timeout.to(TimeUnit.NANOSECONDS);\n","sourceCodeStart":2834,"sourceCodeEnd":2870,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/config/DatabaseDescriptor.java#L2834-L2870","documentation":"setNativeTransportBackoffOnQueueOverload validates the minimum backoff applied to clients when the native transport queue is overloaded; a non-positive minBackoffMillis throws IllegalArgumentException because the backoff must be positive.","triggerScenarios":"Calling DatabaseDescriptor.setNativeTransportBackoffOnQueueOverload with minBackoffMillis <= 0; setting native_transport_min_backoff_on_queue_overload to 0 or negative via JMX or config validation.","commonSituations":"Operators trying to disable backoff by setting min to 0; scripted JMX calls with wrong units or typo'd values.","solutions":["Pass a positive value for minBackoffMillis (e.g. 10ms)","Ensure maxBackoffMillis is strictly greater than minBackoffMillis","If tuning via JMX, resend with corrected parameters"],"exampleFix":"// before\nDatabaseDescriptor.setNativeTransportBackoffOnQueueOverload(0, 1000, TimeUnit.MILLISECONDS);\n// after\nDatabaseDescriptor.setNativeTransportBackoffOnQueueOverload(10, 1000, TimeUnit.MILLISECONDS);","handlingStrategy":"validation","validationCode":"if (minBackoffMillis <= 0)\n    throw new IllegalArgumentException(\"min backoff must be > 0 before calling setNativeTransportBackoffOnQueueOverload\");","typeGuard":null,"tryCatchPattern":"try {\n    DatabaseDescriptor.setNativeTransportBackoffOnQueueOverload(min, max, TimeUnit.MILLISECONDS);\n} catch (IllegalArgumentException e) {\n    logger.warn(\"Rejecting backoff config: {}\", e.getMessage());\n}","preventionTips":["Clamp min backoff to at least 1ms before setting","Enforce min < max at the caller side","Unit-test setter wrappers with boundary values"],"tags":["native-transport","backoff","validation"],"backgroundTag":"argument-out-of-range","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}