{"record":{"id":"83d9e042d06f26dd","repo":"apache/flink","slug":"asynchronousoperationinfo-getfailurecause","errorCode":null,"errorMessage":"{asynchronousOperationInfo.getFailureCause()}","messagePattern":"\\{asynchronousOperationInfo\\.getFailureCause\\(\\)\\}","errorType":"exception","errorClass":"CompletionException","httpStatus":null,"severity":"error","filePath":"flink-clients/src/main/java/org/apache/flink/client/program/rest/RestClusterClient.java","lineNumber":807,"sourceCode":"                                    savepointDisposalStatusMessageParameters =\n                                            savepointDisposalStatusHeaders\n                                                    .getUnresolvedMessageParameters();\n                            savepointDisposalStatusMessageParameters.triggerIdPathParameter.resolve(\n                                    triggerId);\n\n                            return pollResourceAsync(\n                                    () ->\n                                            sendRequest(\n                                                    savepointDisposalStatusHeaders,\n                                                    savepointDisposalStatusMessageParameters));\n                        });\n\n        return savepointDisposalFuture.thenApply(\n                (AsynchronousOperationInfo asynchronousOperationInfo) -> {\n                    if (asynchronousOperationInfo.getFailureCause() == null) {\n                        return Acknowledge.get();\n                    } else {\n                        throw new CompletionException(asynchronousOperationInfo.getFailureCause());\n                    }\n                });\n    }\n\n    @Override\n    public CompletableFuture<Set<AbstractID>> listCompletedClusterDatasetIds() {\n        return sendRequest(ClusterDataSetListHeaders.INSTANCE)\n                .thenApply(\n                        clusterDataSetListResponseBody ->\n                                clusterDataSetListResponseBody.getDataSets().stream()\n                                        .filter(ClusterDataSetEntry::isComplete)\n                                        .map(ClusterDataSetEntry::getDataSetId)\n                                        .map(id -> new AbstractID(StringUtils.hexStringToByte(id)))\n                                        .collect(Collectors.toSet()));\n    }\n\n    @Override\n    public CompletableFuture<Void> invalidateClusterDataset(AbstractID clusterDatasetId) {","sourceCodeStart":789,"sourceCodeEnd":825,"githubUrl":"https://github.com/apache/flink/blob/2f3c205e9266cb30240eb7f4fdab15cad629a70f/flink-clients/src/main/java/org/apache/flink/client/program/rest/RestClusterClient.java#L789-L825","documentation":"Thrown when a savepoint disposal operation completes but the JobManager reports a non-null failure cause in the AsynchronousOperationInfo response. After triggering savepoint disposal via REST and polling its status, if the disposal failed (e.g., savepoint path not found, cleanup error), the failure cause is rethrown as a CompletionException.","triggerScenarios":"Calling disposeSavepoint(savepointPath) when the savepoint at the given path no longer exists, has already been disposed, or the filesystem backing the savepoint is inaccessible.","commonSituations":"Savepoint was already manually deleted; savepoint path points to a different cluster's storage; filesystem plugin for the savepoint scheme is missing on the JobManager; permissions error on the savepoint directory.","solutions":["Read asynchronousOperationInfo.getFailureCause() for the exact disposal error.","Verify the savepoint path still exists and is accessible from the JobManager.","If already disposed, the error can be safely ignored for idempotent cleanup.","Ensure the filesystem plugin (S3, HDFS) is configured on the JobManager."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    client.disposeSavepoint(savepointPath).get();\n} catch (ExecutionException e) {\n    Throwable cause = ExceptionUtils.stripExecutionException(e);\n    // disposal failure — if already deleted, safe to ignore\n    if (!cause.getMessage().contains(\"not found\")) {\n        throw e;\n    }\n}","preventionTips":["Verify savepoint path exists before disposing.","Ensure the filesystem plugin for the savepoint scheme is loaded.","Make disposal idempotent in your cleanup scripts."],"tags":["savepoint","rest-client","async-operation"],"backgroundTag":null,"analyzedSha":"2f3c205e9266cb30240eb7f4fdab15cad629a70f","analyzedAt":"2026-08-14T08:48:24.518Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}