{"record":{"id":"0f6f10ab7ac88edb","repo":"apache/hadoop","slug":"responsetimethreshold-millis-must-be-0","errorCode":null,"errorMessage":"responseTimeThreshold millis must be >= 0","messagePattern":"responseTimeThreshold millis must be >= 0","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/DecayRpcScheduler.java","lineNumber":451,"sourceCode":"  private static long[] parseBackOffResponseTimeThreshold(String ns,\n      Configuration conf, int numLevels) {\n    long[] responseTimeThresholds = conf.getTimeDurations(ns + \".\" +\n            IPC_DECAYSCHEDULER_BACKOFF_RESPONSETIME_THRESHOLDS_KEY,\n        TimeUnit.MILLISECONDS);\n    // backoff thresholds not specified\n    if (responseTimeThresholds.length == 0) {\n      return getDefaultBackOffResponseTimeThresholds(numLevels);\n    }\n    // backoff thresholds specified but not match with the levels\n    if (responseTimeThresholds.length != numLevels) {\n      throw new IllegalArgumentException(\n          \"responseTimeThresholds must match with the number of priority \" +\n          \"levels\");\n    }\n    // invalid thresholds\n    for (long responseTimeThreshold: responseTimeThresholds) {\n      if (responseTimeThreshold <= 0) {\n        throw new IllegalArgumentException(\n            \"responseTimeThreshold millis must be >= 0\");\n      }\n    }\n    return responseTimeThresholds;\n  }\n\n  // 10s for level 0, 20s for level 1, 30s for level 2, ...\n  private static long[] getDefaultBackOffResponseTimeThresholds(int numLevels) {\n    long[] ret = new long[numLevels];\n    for (int i = 0; i < ret.length; i++) {\n      ret[i] = 10000*(i+1);\n    }\n    return ret;\n  }\n\n  private static Boolean parseBackOffByResponseTimeEnabled(String ns,\n      Configuration conf) {\n    return conf.getBoolean(ns + \".\" +","sourceCodeStart":433,"sourceCodeEnd":469,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/DecayRpcScheduler.java#L433-L469","documentation":"In the same parseBackOffResponseTimeThreshold loop, every per-level backoff threshold must be a positive duration; a value of 0ms or negative (which the misleading message calls 'must be >= 0' while the code requires > 0) throws IllegalArgumentException at scheduler construction. A non-positive threshold would make a queue back off before any request is even measured, so it is rejected.","triggerScenarios":"Including a 0 (e.g., '0s,10s,20s' to make level 0 back off immediately) in decay-scheduler.backoff.responsetime.thresholds; a negative value; a malformed duration that parses to 0.","commonSituations":"Attempting to disable backoff for the lowest-priority queue by zeroing its threshold; hand-edited XML with placeholder zeros left in.","solutions":["Replace zero/negative entries with small positive durations (e.g., 1ms or 1s).","If level 0 should back off earliest, give it the smallest positive value while keeping ascending order semantics you want.","Remove the thresholds property to use defaults (10s,20s,30s,...)."],"exampleFix":"// before (core-site.xml)\n<property><name>ipc.8020.decay-scheduler.backoff.responsetime.thresholds</name><value>0s,10s,20s</value></property>\n<!-- 0s entry -> IllegalArgumentException: responseTimeThreshold millis must be >= 0 -->\n\n// after\n<property><name>ipc.8020.decay-scheduler.backoff.responsetime.thresholds</name><value>1s,10s,20s</value></property>","handlingStrategy":"validation","validationCode":"for (long t : th) { // th from getTimeDurations of the thresholds key\n  if (t <= 0) throw new ConfigException(\"backoff thresholds must each be > 0, got \" + t);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["All backoff thresholds must be strictly positive (message says >= 0 but 0 is rejected).","Avoid placeholder zeros in config templates.","Prefer omitting the key to use 10s/20s/30s defaults when unsure."],"tags":["hadoop","ipc","decay-scheduler","backoff","thresholds","config"],"backgroundTag":"config-validation-failed","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}