{"record":{"id":"e66c1f879658dd0e","repo":"apache/seatunnel","slug":"fluss-source-option-start-mode-latest-is-not-sup","errorCode":null,"errorMessage":"Fluss source option 'start_mode=latest' is not supported in BATCH mode.","messagePattern":"Fluss source option 'start_mode=latest' is not supported in BATCH mode\\.","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-fluss/src/main/java/org/apache/seatunnel/connectors/seatunnel/fluss/source/FlussSource.java","lineNumber":105,"sourceCode":"            SourceSplitEnumerator.Context<FlussSourceSplit> enumeratorContext,\n            FlussSourceState checkpointState) {\n        return new FlussSourceSplitEnumerator(\n                sourceConfig, enumeratorContext, checkpointState, isStreaming());\n    }\n\n    private boolean isStreaming() {\n        return getBoundedness() == Boundedness.UNBOUNDED;\n    }\n\n    @Override\n    public void setJobContext(JobContext jobContext) {\n        checkStartMode(jobContext.getJobMode(), sourceConfig.getStartMode());\n        this.jobContext = jobContext;\n    }\n\n    static void checkStartMode(JobMode jobMode, StartMode startMode) {\n        if (JobMode.BATCH.equals(jobMode) && StartMode.LATEST.equals(startMode)) {\n            throw new IllegalArgumentException(\n                    \"Fluss source option '\"\n                            + FlussSourceOptions.START_MODE.key()\n                            + \"=latest' is not supported in BATCH mode.\");\n        }\n    }\n}\n","sourceCodeStart":87,"sourceCodeEnd":112,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-fluss/src/main/java/org/apache/seatunnel/connectors/seatunnel/fluss/source/FlussSource.java#L87-L112","documentation":"FlussSource.checkStartMode rejects the combination of job mode BATCH and start.mode=latest, because 'latest' (streaming from the newest offset) has no defined end in batch mode. The check runs during setJobContext and fails the job at planning time with an IllegalArgumentException.","triggerScenarios":"Submitting a batch-mode job whose Fluss source sets start_mode = latest; a shared config file with start_mode=latest reused in a batch execution (-e local / batch deployment).","commonSituations":"Users porting a streaming config to batch mode; misunderstanding that batch+latest should 'read once from now'; template configs with start_mode pinned to latest.","solutions":["Switch the job to streaming mode so start_mode=latest is valid.","Change start_mode to a bounded value in batch mode (e.g. earliest or a specific timestamp/offset per FlussSourceOptions).","Remove the start_mode option to use the default appropriate for batch mode.","Split the job: batch for history, streaming job for tailing."],"exampleFix":"// before\nFluss {\n  start_mode = latest  // submitted with batch mode\n}\n// after (batch)\nFluss {\n  start_mode = earliest\n}\n// or submit with streaming mode","handlingStrategy":"validation","validationCode":"JobMode mode = jobContext.getJobMode();\nif (JobMode.BATCH.equals(mode) && StartMode.LATEST.equals(config.getStartMode())) {\n    throw new IllegalArgumentException(\"start_mode=latest requires streaming mode\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Match start_mode to job mode: latest only with streaming","Don't reuse streaming configs for batch submissions","Use earliest or a bounded offset/timestamp in batch jobs","Validate job mode/config combination before submission"],"tags":["fluss","config","validation","batch-mode"],"backgroundTag":"conflicting-config-options","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}