{"record":{"id":"16905ea901235202","repo":"apache/seatunnel","slug":"input-multiline-flush-idle-timeout-ms-must-not-be","errorCode":null,"errorMessage":"input.multiline.flush-idle-timeout-ms must not be negative (input id=${id}).","messagePattern":"input\\.multiline\\.flush-idle-timeout-ms must not be negative \\(input id=(.+?)\\)\\.","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"seatunnel-edge-agent/seatunnel-edge-agent-connector/src/main/java/org/apache/seatunnel/edge/agent/connector/config/FileCollectConfig.java","lineNumber":87,"sourceCode":"        }\n        this.paths = Collections.unmodifiableList(new ArrayList<>(pathList));\n        this.encoding = config.get(FileCollectOptions.ENCODING);\n        this.charset = resolveCharset(this.encoding, this.id);\n        this.readFromBeginning = config.get(FileCollectOptions.READ_FROM_BEGINNING);\n        this.multilinePattern =\n                config.getOptional(FileCollectOptions.MULTILINE_PATTERN).orElse(null);\n        this.multilineMatch = config.get(FileCollectOptions.MULTILINE_MATCH);\n        validateMultilineMatch(this.multilineMatch);\n        this.multilineNegate = config.get(FileCollectOptions.MULTILINE_NEGATE);\n        this.multilineMaxLines = config.get(FileCollectOptions.MULTILINE_MAX_LINES);\n        if (this.multilineMaxLines < 1) {\n            throw new IllegalArgumentException(\n                    \"input.multiline.max-lines must be >= 1 when set (input id=\" + this.id + \").\");\n        }\n        this.multilineFlushIdleTimeoutMs =\n                config.get(FileCollectOptions.MULTILINE_FLUSH_IDLE_TIMEOUT_MS);\n        if (this.multilineFlushIdleTimeoutMs < 0L) {\n            throw new IllegalArgumentException(\n                    \"input.multiline.flush-idle-timeout-ms must not be negative (input id=\"\n                            + this.id\n                            + \").\");\n        }\n        if (isMultilineEnabled() && this.multilineFlushIdleTimeoutMs <= 0L) {\n            throw new IllegalArgumentException(\n                    \"input.multiline.flush-idle-timeout-ms must be > 0 when multiline is enabled,\"\n                            + \" otherwise the buffer may never flush (input id=\"\n                            + this.id\n                            + \").\");\n        }\n        this.outputType = config.get(FileCollectOptions.OUTPUT_FORMAT_TYPE);\n        validateOutputType(this.outputType);\n        this.onError = config.get(FileCollectOptions.ON_ERROR);\n        validateOnError(this.onError);\n        this.globScanIntervalMs = config.get(FileCollectOptions.GLOB_SCAN_INTERVAL_MS);\n        if (this.globScanIntervalMs < 1L) {\n            throw new IllegalArgumentException(","sourceCodeStart":69,"sourceCodeEnd":105,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-edge-agent/seatunnel-edge-agent-connector/src/main/java/org/apache/seatunnel/edge/agent/connector/config/FileCollectConfig.java#L69-L105","documentation":"The multiline flush idle timeout (input.multiline.flush-idle-timeout-ms) controls how long an incomplete multiline buffer is kept before flushing. FileCollectConfig rejects negative values with this IllegalArgumentException, since a negative timeout has no meaning.","triggerScenarios":"Configuring input.multiline.flush-idle-timeout-ms to any negative value in a file-collect input definition.","commonSituations":"Typo like -1 intending 'disabled', sign errors in generated configs, or misreading the option as a relative offset.","solutions":["Set input.multiline.flush-idle-timeout-ms to a positive value (e.g. 30000)","Remove the option to use the default timeout","If multiline is disabled, omit the option rather than using negative sentinels"],"exampleFix":"# before\ninput.multiline.flush-idle-timeout-ms = -1\n# after\ninput.multiline.flush-idle-timeout-ms = 30000","handlingStrategy":"validation","validationCode":"if (cfg.contains(FileCollectOptions.MULTILINE_FLUSH_IDLE_TIMEOUT_MS) && cfg.get(FileCollectOptions.MULTILINE_FLUSH_IDLE_TIMEOUT_MS) < 0L) { throw new IllegalArgumentException(\"flush-idle-timeout-ms must be >= 0\"); }","typeGuard":null,"tryCatchPattern":"try { FileCollectConfig.from(config); } catch (IllegalArgumentException e) { log.error(\"Invalid timeout: {}\", e.getMessage()); }","preventionTips":["Never use negative values as 'disabled' sentinels for timeouts","Omit the option instead of using sentinel values","Document allowed ranges for generated configs"],"tags":["config","validation","timeout"],"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-23T08:17:48.524Z"}