{"record":{"id":"83e7a9d992b5ea0b","repo":"apache/seatunnel","slug":"checkpoint-interval-is-set-to-which-is-not-posi","errorCode":null,"errorMessage":"checkpoint.interval is set to {} which is not positive, fallback to default {} ms for streaming job.","messagePattern":"checkpoint\\.interval is set to (.+?) which is not positive, fallback to default (.+?) ms for streaming job\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"seatunnel-core/seatunnel-flink-starter/seatunnel-flink-starter-common/src/main/java/org/apache/seatunnel/core/starter/flink/execution/AbstractFlinkRuntimeEnvironment.java","lineNumber":98,"sourceCode":"\n    public StreamExecutionEnvironment getStreamExecutionEnvironment() {\n        return environment;\n    }\n\n    protected void setCheckpoint() {\n        OptionalLong intervalOpt = resolveCheckpointInterval(true);\n        boolean hasExplicitInterval = intervalOpt.isPresent();\n        boolean positiveInterval = intervalOpt.isPresent() && intervalOpt.getAsLong() > 0;\n        long interval = intervalOpt.orElse(DEFAULT_CHECKPOINT_INTERVAL_MS);\n\n        if (jobMode == JobMode.BATCH && !positiveInterval) {\n            LOGGER.info(\n                    \"Checkpoint is disabled for batch job because 'checkpoint.interval' is not set or <= 0.\");\n            return;\n        }\n\n        if (hasExplicitInterval && !positiveInterval) {\n            LOGGER.warn(\n                    \"checkpoint.interval is set to {} which is not positive, fallback to default {} ms for streaming job.\",\n                    interval,\n                    DEFAULT_CHECKPOINT_INTERVAL_MS);\n            interval = DEFAULT_CHECKPOINT_INTERVAL_MS;\n        }\n\n        CheckpointConfig checkpointConfig = environment.getCheckpointConfig();\n        environment.enableCheckpointing(interval);\n\n        if (config.hasPath(EnvCommonOptions.CHECKPOINT_TIMEOUT.key())) {\n            long timeout = config.getLong(EnvCommonOptions.CHECKPOINT_TIMEOUT.key());\n            checkpointConfig.setCheckpointTimeout(timeout);\n        } else if (EnvironmentUtil.hasPathAndWaring(config, ConfigKeyName.CHECKPOINT_TIMEOUT)) {\n            long timeout = config.getLong(ConfigKeyName.CHECKPOINT_TIMEOUT);\n            checkpointConfig.setCheckpointTimeout(timeout);\n        } else if (config.hasPath(EnvCommonOptions.CHECKPOINT_MIN_PAUSE.key())) {\n            long minPause = config.getLong(EnvCommonOptions.CHECKPOINT_MIN_PAUSE.key());\n            checkpointConfig.setMinPauseBetweenCheckpoints(minPause);","sourceCodeStart":80,"sourceCodeEnd":116,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-core/seatunnel-flink-starter/seatunnel-flink-starter-common/src/main/java/org/apache/seatunnel/core/starter/flink/execution/AbstractFlinkRuntimeEnvironment.java#L80-L116","documentation":"AbstractFlinkRuntimeEnvironment.setCheckpoint validates the 'checkpoint.interval' config for streaming jobs. If the user set an explicit interval that is zero or negative (not a valid Flink checkpoint duration), it logs this warning and substitutes DEFAULT_CHECKPOINT_INTERVAL_MS instead of propagating the invalid value to Flink, which would throw at job construction. The job still runs with checkpointing enabled at the default interval.","triggerScenarios":"setCheckpoint() is invoked from createStreamEnvironment for a streaming job where checkpoint.interval was explicitly configured (hasExplicitInterval) but the value is <= 0 (positiveInterval == false).","commonSituations":"Config typo like `checkpoint.interval = 0` or a negative value; interval computed from a variable/placeholder that resolved to 0; misunderstanding that 0 disables checkpointing (it only does so when the option is unset or <=0 for batch; for streaming it is replaced by the default).","solutions":["Set checkpoint.interval to a positive millisecond value (e.g. 60000) in the job config.","If checkpointing should be off, do not set checkpoint.interval at all (or rely on the documented disable path) instead of using 0.","Confirm effective behavior from the log line showing the fallback default interval and adjust if the default does not match your recovery-time requirements."],"exampleFix":"// before\ncheckpoint.interval = 0\n// after\ncheckpoint.interval = 60000","handlingStrategy":"validation","validationCode":"// validate before submit\nlong interval = config.getLong(\"checkpoint.interval\", -1);\nif (config.hasPath(\"checkpoint.interval\") && interval <= 0) {\n    throw new IllegalArgumentException(\"checkpoint.interval must be > 0 ms, got: \" + interval);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always configure checkpoint.interval as a positive millisecond value","Do not use 0 to disable checkpointing in streaming jobs — omit the option instead","Check startup logs for the fallback warning to confirm the effective interval"],"tags":["flink","checkpoint","configuration","fallback"],"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"}