{"record":{"id":"0eb8f1aa4d63bcc5","repo":"apache/flink","slug":"interrupted-0eb8f1","errorCode":null,"errorMessage":"Interrupted","messagePattern":"Interrupted","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"warning","filePath":"flink-formats/flink-orc/src/main/java/org/apache/flink/orc/AbstractOrcFileInputFormat.java","lineNumber":294,"sourceCode":"            orcReader.close();\n        }\n\n        /**\n         * The argument of {@link RecordReader#seekToRow(long)} must come from {@link\n         * RecordReader#getRowNumber()}. The internal implementation of ORC is very confusing. It\n         * has special behavior when dealing with Predicate.\n         */\n        public void seek(CheckpointedPosition position) throws IOException {\n            orcReader.seekToRow(position.getOffset());\n            recordsToSkip = position.getRecordsAfterOffset();\n        }\n\n        private OrcReaderBatch<T, BatchT> getCachedEntry() throws IOException {\n            try {\n                return pool.pollEntry();\n            } catch (InterruptedException e) {\n                Thread.currentThread().interrupt();\n                throw new IOException(\"Interrupted\");\n            }\n        }\n\n        private void skipRecord(RecordIterator<T> records) {\n            while (recordsToSkip > 0 && records.next() != null) {\n                recordsToSkip--;\n            }\n        }\n    }\n}\n","sourceCodeStart":276,"sourceCodeEnd":305,"githubUrl":"https://github.com/apache/flink/blob/2f3c205e9266cb30240eb7f4fdab15cad629a70f/flink-formats/flink-orc/src/main/java/org/apache/flink/orc/AbstractOrcFileInputFormat.java#L276-L305","documentation":"AbstractOrcFileInputFormat's reader threads take ORC batches from a pool via pool.pollEntry(); if the thread is interrupted while waiting, the code restores the interrupt flag (Thread.currentThread().interrupt()) and converts the InterruptedException into IOException('Interrupted'). This occurs during reader shutdown/cancellation, e.g. when a source is canceled mid-read or a task is failing over.","triggerScenarios":"OrcFileSource reader thread blocked in pool.pollEntry() gets interrupt() from task cancellation, job shutdown, or failover; also possible if user code interrupts the read thread.","commonSituations":"Job cancellation while ORC batches are in flight; checkpoint-timeout-triggered task restarts; source idle-timeout configurations cancelling readers; intentional fast failover tests.","solutions":["If seen during clean cancellation/shutdown, treat it as benign: the interrupt flag is already restored and the task is going down.","If it appears during normal reads, look for what is interrupting the reader thread (task manager restarts, socket timeouts causing task failure) and fix that root cause.","Ensure you do not manually interrupt Flink task threads in surrounding application code."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { /* ORC batch read loop */ } catch (IOException e) { if (Thread.currentThread().isInterrupted() || \"Interrupted\".equals(e.getMessage())) { // shutdown in progress return; } throw e; }","preventionTips":["Treat 'Interrupted' during cancellation as an expected shutdown signal, not data corruption.","Never interrupt Flink task threads from application code.","Checkpoint regularly so restarts after interruption resume from a consistent position."],"tags":["flink","orc","interrupt","shutdown","filesystem-source"],"backgroundTag":null,"analyzedSha":"2f3c205e9266cb30240eb7f4fdab15cad629a70f","analyzedAt":"2026-08-14T08:48:24.518Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}