{"record":{"id":"252b6f298075c339","repo":"apache/seatunnel","slug":"no-checkpoint-found-for-job-job-id-is-jobid-252b6f","errorCode":null,"errorMessage":"No checkpoint found for job, job id is: ${jobId}","messagePattern":"No checkpoint found for job, job id is: (.+?)","errorType":"exception","errorClass":"CheckpointStorageException","httpStatus":null,"severity":"error","filePath":"seatunnel-engine/seatunnel-engine-storage/checkpoint-storage-plugins/checkpoint-storage-local-file/src/main/java/org/apache/seatunnel/engine/checkpoint/storage/localfile/LocalFileStorage.java","lineNumber":371,"sourceCode":"                        }\n                    }\n                });\n    }\n\n    @Override\n    public void deleteCheckpoint(String jobId, String pipelineId, List<String> checkpointIdList)\n            throws CheckpointStorageException {\n        String parentPath = getStorageParentDirectory() + jobId;\n        Collection<File> fileList = new ArrayList<>();\n        try {\n            fileList = FileUtils.listFiles(new File(parentPath), FILE_EXTENSIONS, false);\n        } catch (Exception e) {\n            if (!(e.getCause() instanceof NoSuchFileException)) {\n                throw new CheckpointStorageException(ExceptionUtils.getMessage(e));\n            }\n        }\n        if (fileList.isEmpty()) {\n            throw new CheckpointStorageException(\n                    \"No checkpoint found for job, job id is: \" + jobId);\n        }\n        fileList.forEach(\n                file -> {\n                    String fileName = file.getName();\n                    String checkpointIdByFileName = getCheckpointIdByFileName(fileName);\n                    if (pipelineId.equals(getPipelineIdByFileName(fileName))\n                            && checkpointIdList.contains(checkpointIdByFileName)) {\n                        try {\n                            FileUtils.delete(file);\n                        } catch (Exception e) {\n                            log.error(\n                                    \"Failed to delete checkpoint {} for job {}, pipeline {}\",\n                                    checkpointIdByFileName,\n                                    jobId,\n                                    pipelineId,\n                                    e);\n                        }","sourceCodeStart":353,"sourceCodeEnd":389,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-engine/seatunnel-engine-storage/checkpoint-storage-plugins/checkpoint-storage-local-file/src/main/java/org/apache/seatunnel/engine/checkpoint/storage/localfile/LocalFileStorage.java#L353-L389","documentation":"LocalFileStorage.deleteCheckpoint(jobId) throws 'No checkpoint found for job, job id is: <jobId>' when the job's checkpoint directory lists successfully but contains zero checkpoint files. The delete-all API treats an empty directory as an error, so callers deleting all checkpoints of an already-clean job will see this CheckpointStorageException.","triggerScenarios":"Calling deleteCheckpoint(jobId) when no checkpoint files exist for the job — already deleted by a previous call, job never wrote a completed checkpoint, or an external retention process emptied the directory.","commonSituations":"Retrying job cleanup after a first successful delete; running cleanup for jobs that failed before the first checkpoint snapshot; idempotent cleanup schedulers racing each other; mistakenly using a jobId that has no stored state (wrong id, different storage directory).","solutions":["Check existence first: call getAllCheckpoints(jobId) and skip deleteCheckpoint when the list is empty.","Catch CheckpointStorageException and treat the 'No checkpoint found' message as a benign no-op in cleanup flows.","Verify the jobId matches the job that actually stored checkpoints (check the storage directory listing).","If checkpoints were expected, look for earlier write failures or a misconfigured storage parent directory."],"exampleFix":"// before\nstorage.deleteCheckpoint(jobId); // throws when job has no checkpoints\n// after\nif (!storage.getAllCheckpoints(jobId).isEmpty()) {\n    storage.deleteCheckpoint(jobId);\n} else {\n    log.info(\"No checkpoints to delete for job {}\", jobId);\n}","handlingStrategy":"validation","validationCode":"// Skip delete when the job has no stored checkpoints\nif (storage.getAllCheckpoints(jobId).isEmpty()) {\n    log.info(\"No checkpoints stored for job {}, skipping delete\", jobId);\n    return;\n}","typeGuard":null,"tryCatchPattern":"try {\n    storage.deleteCheckpoint(jobId);\n} catch (CheckpointStorageException e) {\n    if (e.getMessage().contains(\"No checkpoint found\")) {\n        log.info(\"Job {} checkpoints already removed\", jobId);\n    } else {\n        throw e;\n    }\n}","preventionTips":["Check emptiness via getAllCheckpoints before calling deleteCheckpoint(jobId).","Design cleanup schedulers to be idempotent — repeated deletes on the same job are expected.","Validate the jobId before cleanup; a wrong/foreign id often means nothing was ever stored.","If checkpoints were expected, investigate earlier write failures or a misconfigured storage directory."],"tags":["checkpoint","local-file-storage","delete","not-found"],"backgroundTag":"file-not-found","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}