{"record":{"id":"1f85c7b7c307317c","repo":"apache/seatunnel","slug":"retry-backoff-ms-must-be-0","errorCode":null,"errorMessage":"retry.backoff-ms must be >= 0.","messagePattern":"retry\\.backoff-ms must be >= 0\\.","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"seatunnel-edge-agent/seatunnel-edge-agent-starter/src/main/java/org/apache/seatunnel/edge/agent/starter/config/RetryConfig.java","lineNumber":47,"sourceCode":"public class RetryConfig implements Serializable {\n\n    private static final long serialVersionUID = 1L;\n\n    private final int maxAttempts;\n    private final long backoffMs;\n    private final long backoffMaxMs;\n\n    public RetryConfig(ReadonlyConfig config) {\n        Objects.requireNonNull(config, \"config\");\n        ConfigValidator.of(config).validate(EdgeAgentRuntimeOptionRules.retryRule());\n\n        this.maxAttempts = config.get(EdgeAgentRuntimeOptions.RETRY_MAX_ATTEMPTS);\n        if (this.maxAttempts < 1) {\n            throw new IllegalArgumentException(\"retry.max-attempts must be >= 1.\");\n        }\n        this.backoffMs = config.get(EdgeAgentRuntimeOptions.RETRY_BACKOFF_MS);\n        if (this.backoffMs < 0L) {\n            throw new IllegalArgumentException(\"retry.backoff-ms must be >= 0.\");\n        }\n        this.backoffMaxMs = config.get(EdgeAgentRuntimeOptions.RETRY_BACKOFF_MAX_MS);\n        if (this.backoffMaxMs < this.backoffMs) {\n            throw new IllegalArgumentException(\n                    \"retry.backoff-max-ms must be >= effective retry.backoff-ms (\"\n                            + this.backoffMs\n                            + \" ms).\");\n        }\n    }\n\n    public static RetryConfig from(ReadonlyConfig config) {\n        return new RetryConfig(config);\n    }\n}\n","sourceCodeStart":29,"sourceCodeEnd":62,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-edge-agent/seatunnel-edge-agent-starter/src/main/java/org/apache/seatunnel/edge/agent/starter/config/RetryConfig.java#L29-L62","documentation":"RetryConfig requires retry.backoff-ms to be non-negative since it is the base delay between retries; a negative delay is meaningless. The constructor throws IllegalArgumentException when the configured value is below 0.","triggerScenarios":"Constructing RetryConfig with ReadonlyConfig where EdgeAgentRuntimeOptions.RETRY_BACKOFF_MS is a negative long.","commonSituations":"Sign typo in YAML ('-1000'); unit confusion leading to negative computed values; hand-edited config files.","solutions":["Set retry.backoff-ms to 0 or a positive value.","Use 0 if you want no initial backoff delay.","Check for accidental negative signs in the retry section."],"exampleFix":"# before\nretry:\n  backoff-ms: -1000\n# after\nretry:\n  backoff-ms: 1000","handlingStrategy":"validation","validationCode":"Long backoffMs = config.get(EdgeAgentRuntimeOptions.RETRY_BACKOFF_MS);\nif (backoffMs != null && backoffMs < 0L) {\n    throw new IllegalArgumentException(\"retry.backoff-ms must be >= 0\");\n}","typeGuard":null,"tryCatchPattern":"try { RetryConfig retry = new RetryConfig(config); } catch (IllegalArgumentException e) { log.error(\"Retry config invalid: {}\", e.getMessage()); }","preventionTips":["Check for accidental negative signs in YAML durations.","Use 0 for no delay, positive values for backoff.","Keep durations in ms as documented."],"tags":["config","retry","validation"],"backgroundTag":"invalid-config-value","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}