{"record":{"id":"d0e70aae20b20863","repo":"apache/seatunnel","slug":"currentthread-already-be-interrupted-skip-trigger","errorCode":null,"errorMessage":"currentThread already be interrupted, skip trigger checkpoint","messagePattern":"currentThread already be interrupted, skip trigger checkpoint","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/checkpoint/CheckpointCoordinator.java","lineNumber":733,"sourceCode":"     * <ul>\n     *   <li>The current thread must not be interrupted\n     *   <li>All pipeline tasks must be in READY state\n     *   <li>The configured checkpoint interval must have elapsed (except for final or schema change\n     *       checkpoints)\n     * </ul>\n     *\n     * <p>If the minimum interval has not yet passed, the checkpoint trigger will be rescheduled for\n     * the remaining delay time.\n     *\n     * <p>This mechanism ensures stable and controlled checkpoint scheduling, preventing excessive\n     * checkpoint triggering while maintaining data consistency.\n     *\n     * @param checkpointType the type of checkpoint to trigger, which determines whether interval\n     *     constraints should be applied\n     */\n    protected void tryTriggerPendingCheckpoint(CheckpointType checkpointType) {\n        if (Thread.currentThread().isInterrupted()) {\n            LOG.warn(\"currentThread already be interrupted, skip trigger checkpoint\");\n            return;\n        }\n        final long currentTimestamp = Instant.now().toEpochMilli();\n        if (checkpointType.notFinalCheckpoint() && checkpointType.notSchemaChangeCheckpoint()) {\n            if (!isAllTaskReady.get()) {\n                LOG.info(\"Not all tasks are ready, skipping checkpoint trigger\");\n                return;\n            }\n            long interval = currentTimestamp - latestTriggerTimestamp.get();\n            if (interval <= 0) {\n                LOG.error(\n                        \"The time on your server may not be incremental which can lead checkpoint to stop. \"\n                                + \"The latestTriggerTimestamp: ({}), but the currentTimestamp: ({})\",\n                        latestTriggerTimestamp.get(),\n                        currentTimestamp);\n            }\n            if (interval < coordinatorConfig.getCheckpointInterval()) {\n                LOG.info(","sourceCodeStart":715,"sourceCodeEnd":751,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/checkpoint/CheckpointCoordinator.java#L715-L751","documentation":"CheckpointCoordinator.tryTriggerPendingCheckpoint skips triggering a checkpoint when the current thread is already interrupted, logging this warning. This prevents scheduling checkpoint work on a thread being torn down, which would throw unhandled InterruptedExceptions or submit work into a closing executor.","triggerScenarios":"tryTriggerPendingCheckpoint (invoked from scheduleTriggerPendingCheckpoint, readyToClose, or restoreCoordinator) runs on a thread whose interrupt flag is set — typically during job cancel/close/failover when checkpoint timers fire concurrently with shutdown.","commonSituations":"Job cancellation while a periodic checkpoint timer fires; coordinator close racing a final checkpoint trigger; restore being interrupted by an external cancel request.","solutions":["Usually benign during job shutdown — no action needed; checkpoints are irrelevant once the job is cancelled/closed.","If seen outside shutdown, inspect why the coordinator thread got interrupted (thread-pool shutdown, failover) and fix the lifecycle ordering.","Ensure jobs are cancelled via the engine's cancel API rather than killing threads/executors directly.","Check for repeatable interrupt sources (aggressive executor shutdownNow in custom plugins) that race the coordinator."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"if (Thread.currentThread().isInterrupted()) { skipCheckpointTrigger(); return; }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Cancel jobs through the engine's cancel lifecycle","Avoid shutdownNow() on coordinator executor threads from custom code","Check failover logs if this appears outside shutdown"],"tags":["checkpoint","interrupt","zeta","coordinator"],"backgroundTag":"thread-interrupted","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"}