{"record":{"id":"afa8a719bf73cbc5","repo":"prestodb/presto","slug":"uncheckedioexception","errorCode":null,"errorMessage":"UncheckedIOException","messagePattern":"UncheckedIOException","errorType":"exception","errorClass":"UncheckedIOException","httpStatus":null,"severity":"error","filePath":"presto-hudi/src/main/java/com/facebook/presto/hudi/HudiPageSource.java","lineNumber":166,"sourceCode":"                }\n            }\n            return new Page(batchSize, blocks);\n        }\n        catch (RuntimeException e) {\n            closeWithSuppression(e);\n            throwIfInstanceOf(e, PrestoException.class);\n            throw new PrestoException(HUDI_CURSOR_ERROR, e);\n        }\n    }\n\n    @Override\n    public void close()\n    {\n        try {\n            delegate.close();\n        }\n        catch (IOException e) {\n            throw new UncheckedIOException(e);\n        }\n    }\n\n    @Override\n    public String toString()\n    {\n        return delegate.toString();\n    }\n\n    @Override\n    public long getSystemMemoryUsage()\n    {\n        return delegate.getSystemMemoryUsage();\n    }\n\n    protected void closeWithSuppression(Throwable throwable)\n    {\n        requireNonNull(throwable, \"throwable is null\");","sourceCodeStart":148,"sourceCodeEnd":184,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-hudi/src/main/java/com/facebook/presto/hudi/HudiPageSource.java#L148-L184","documentation":"HudiPageSource.close() delegates to the underlying page source's close and translates a checked IOException into an UncheckedIOException. This is thrown when releasing the underlying reader fails, and it can surface from closeWithSuppression during error handling, potentially masking the original query error.","triggerScenarios":"Calling close() (directly or via closeWithSuppression after a cursor error or query cancellation) when delegate.close() throws IOException — typically because the underlying HDFS/file reader fails while being released.","commonSituations":"HDFS client issues or NameNode unavailability at cleanup time, interrupted/close races on split readers, or underlying filesystem timeouts during teardown.","solutions":["Check the chained IOException cause for the filesystem-level problem (HDFS connectivity, permissions)","Verify HDFS cluster health and network stability from the Presto worker","If it masks an earlier error, look at the suppressed exception for the root cause","Retry the query; transient filesystem failures during close usually do not corrupt state"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try (HudiPageSource source = openSource(split)) {\n    return source.getNextPage();\n} catch (UncheckedIOException e) {\n    log.warn(\"Failed to close Hudi source; cause={}\", e.getCause());\n    // check suppressed exceptions for the primary query error\n}","preventionTips":["Treat close-time UncheckedIOException as secondary; inspect suppressed exceptions for the root error","Ensure stable HDFS connectivity from workers","Avoid force-cancelling long scans during HDFS instability","Monitor worker logs for repeated close failures pointing at reader leaks"],"tags":["presto","hudi","io","unchecked-io","resource-cleanup"],"backgroundTag":"unchecked-ioexception-on-close","analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}