{"record":{"id":"54899a236372bc7f","repo":"apache/cassandra","slug":"native-transport-max-backoff-on-queue-overload-sho","errorCode":null,"errorMessage":"native_transport_max_backoff_on_queue_overload should be greater than native_transport_min_backoff_on_queue_overload, but %s >= %s","messagePattern":"native_transport_max_backoff_on_queue_overload should be greater than native_transport_min_backoff_on_queue_overload, but (.+?) >= (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/config/DatabaseDescriptor.java","lineNumber":2855,"sourceCode":"    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\n            return native_transport_timeout_nanos_cached;\n        }\n        return conf.native_transport_timeout.to(timeUnit);","sourceCodeStart":2837,"sourceCodeEnd":2873,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/config/DatabaseDescriptor.java#L2837-L2873","documentation":"setNativeTransportBackoffOnQueueOverload requires max backoff to be strictly greater than min backoff; passing minBackoffMillis >= maxBackoffMillis throws IllegalArgumentException with a formatted message showing both values.","triggerScenarios":"Calling setNativeTransportBackoffOnQueueOverload(min, max, unit) with min >= max (e.g. equal values or swapped arguments).","commonSituations":"Swapping min/max arguments at a call site; setting both to the same value assuming equality is allowed.","solutions":["Ensure maxBackoffMillis > minBackoffMillis","Check argument order in the call (min first, then max)","Re-read the values from the error message to see which was passed where"],"exampleFix":"// before\nsetNativeTransportBackoffOnQueueOverload(1000, 1000, TimeUnit.MILLISECONDS);\n// after\nsetNativeTransportBackoffOnQueueOverload(100, 1000, TimeUnit.MILLISECONDS);","handlingStrategy":"validation","validationCode":"if (minBackoffMillis >= maxBackoffMillis)\n    throw new IllegalArgumentException(\"require min < max: \" + minBackoffMillis + \" >= \" + maxBackoffMillis);","typeGuard":null,"tryCatchPattern":"try {\n    DatabaseDescriptor.setNativeTransportBackoffOnQueueOverload(min, max, unit);\n} catch (IllegalArgumentException e) {\n    // message contains both offending values; log and fall back to defaults\n    logger.warn(\"Backoff range invalid: {}\", e.getMessage());\n}","preventionTips":["Check argument order (min, max) at call sites","Add assertion min < max in wrapper code","Property-based tests for range setters"],"tags":["native-transport","backoff","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-17T15:17:12.973Z"}