{"record":{"id":"e76050c2e09859dc","repo":"apache/seatunnel","slug":"input-glob-scan-interval-ms-must-be-1-when-set","errorCode":null,"errorMessage":"input.glob-scan-interval-ms must be >= 1 when set (input id=${id}).","messagePattern":"input\\.glob-scan-interval-ms must be >= 1 when set \\(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":105,"sourceCode":"            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(\n                    \"input.glob-scan-interval-ms must be >= 1 when set (input id=\"\n                            + this.id\n                            + \").\");\n        }\n        this.closeInactiveMs = config.get(FileCollectOptions.CLOSE_INACTIVE_MS);\n        if (this.closeInactiveMs < 0L) {\n            throw new IllegalArgumentException(\n                    \"input.close-inactive-ms must be >= 0 when set (input id=\" + this.id + \").\");\n        }\n    }\n\n    public static FileCollectConfig from(ReadonlyConfig config) {\n        return new FileCollectConfig(config);\n    }\n\n    public boolean isMultilineEnabled() {\n        return multilinePattern != null && !multilinePattern.isEmpty();\n    }","sourceCodeStart":87,"sourceCodeEnd":123,"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#L87-L123","documentation":"input.glob-scan-interval-ms controls how often the reader re-scans the glob for new files. FileCollectConfig requires it to be at least 1ms; values below 1 throw this IllegalArgumentException at config load.","triggerScenarios":"Setting input.glob-scan-interval-ms to 0 or a negative number in the file-collect input config.","commonSituations":"Attempting 'continuous scanning with no delay' via 0, or templated configs where an empty variable resolves to 0.","solutions":["Set input.glob-scan-interval-ms to a positive value (e.g. 1000)","Remove the option to use the built-in default scan interval","Fix template rendering that produces 0 for unset variables"],"exampleFix":"# before\ninput.glob-scan-interval-ms = 0\n# after\ninput.glob-scan-interval-ms = 1000","handlingStrategy":"validation","validationCode":"if (cfg.contains(FileCollectOptions.GLOB_SCAN_INTERVAL_MS) && cfg.get(FileCollectOptions.GLOB_SCAN_INTERVAL_MS) < 1L) { throw new IllegalArgumentException(\"glob-scan-interval-ms must be >= 1\"); }","typeGuard":null,"tryCatchPattern":"try { FileCollectConfig.from(config); } catch (IllegalArgumentException e) { log.error(\"Invalid scan interval: {}\", e.getMessage()); }","preventionTips":["Use >=1ms values only; rely on defaults for typical workloads","Guard templated configs so unset variables do not render as 0","Sanity-check scan intervals against expected file arrival rates"],"tags":["config","validation","file-watching"],"backgroundTag":"value-out-of-range","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"}