{"record":{"id":"cedf61926265384a","repo":"prestodb/presto","slug":"unexpected-error-in-orc-file-tail-reading-after-ca","errorCode":null,"errorMessage":"Unexpected error in orc file tail reading after cache miss","messagePattern":"Unexpected error in orc file tail reading after cache miss","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"presto-orc/src/main/java/com/facebook/presto/orc/cache/CachingOrcFileTailSource.java","lineNumber":65,"sourceCode":"            return delegate.getOrcFileTail(orcDataSource, metadataReader, writeValidation, cacheable, fileModificationTime);\n        }\n        try {\n            OrcFileTail orcFileTail = cache.getIfPresent(orcDataSource.getId());\n            if (orcFileTail != null) {\n                if (orcFileTail.getFileModificationTime() == fileModificationTime) {\n                    return orcFileTail;\n                }\n                cache.invalidate(orcDataSource.getId()); // stale entry\n                // This get call is to increment the miss count for invalidated entries so the stats are recorded correctly.\n                cache.getIfPresent(orcDataSource.getId());\n            }\n            orcFileTail = delegate.getOrcFileTail(orcDataSource, metadataReader, writeValidation, cacheable, fileModificationTime);\n            cache.put(orcDataSource.getId(), orcFileTail);\n            return orcFileTail;\n        }\n        catch (UncheckedExecutionException e) {\n            throwIfInstanceOf(e.getCause(), IOException.class);\n            throw new IOException(\"Unexpected error in orc file tail reading after cache miss\", e.getCause());\n        }\n    }\n}\n","sourceCodeStart":47,"sourceCodeEnd":69,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-orc/src/main/java/com/facebook/presto/orc/cache/CachingOrcFileTailSource.java#L47-L69","documentation":"ORC tail-cache error in CachingOrcFileTailSource: after a cache miss, the delegate read of the file tail threw unexpectedly, and the error is rethrown tagged 'after cache miss'. The underlying cause (I/O failure, corruption) is in the cause chain; the cache only softens hits, it cannot recover failing reads.","triggerScenarios":"Thrown at presto-orc/src/main/java/com/facebook/presto/orc/cache/CachingOrcFileTailSource.java:65 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the cause chain for the underlying I/O or corruption error","Verify the ORC file is readable and complete","Check for cache-filesystem mismatch (file changed while cached metadata retained)"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}