{"record":{"id":"b2475e0505f932bc","repo":"apache/flink","slug":"could-not-read-page-in-col","errorCode":null,"errorMessage":"could not read page {} in col {}","messagePattern":"could not read page (.+?) in col (.+?)","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"flink-formats/flink-parquet/src/main/java/org/apache/flink/formats/parquet/vector/reader/AbstractColumnReader.java","lineNumber":216,"sourceCode":"    private void readPageV1(DataPageV1 page) throws IOException {\n        this.pageValueCount = page.getValueCount();\n        ValuesReader rlReader = page.getRlEncoding().getValuesReader(descriptor, REPETITION_LEVEL);\n\n        // Initialize the decoders.\n        if (page.getDlEncoding() != Encoding.RLE && descriptor.getMaxDefinitionLevel() != 0) {\n            throw new UnsupportedOperationException(\n                    \"Unsupported encoding: \" + page.getDlEncoding());\n        }\n        int bitWidth = BytesUtils.getWidthFromMaxInt(descriptor.getMaxDefinitionLevel());\n        this.runLenDecoder = new RunLengthDecoder(bitWidth);\n        try {\n            BytesInput bytes = page.getBytes();\n            ByteBufferInputStream in = bytes.toInputStream();\n            rlReader.initFromPage(pageValueCount, in);\n            this.runLenDecoder.initFromStream(pageValueCount, in);\n            prepareNewPage(page.getValueEncoding(), in);\n        } catch (IOException e) {\n            throw new IOException(\"could not read page \" + page + \" in col \" + descriptor, e);\n        }\n    }\n\n    private void readPageV2(DataPageV2 page) throws IOException {\n        this.pageValueCount = page.getValueCount();\n\n        int bitWidth = BytesUtils.getWidthFromMaxInt(descriptor.getMaxDefinitionLevel());\n        // do not read the length from the stream. v2 pages handle dividing the page bytes.\n        this.runLenDecoder = new RunLengthDecoder(bitWidth, false);\n        this.runLenDecoder.initFromStream(\n                this.pageValueCount, page.getDefinitionLevels().toInputStream());\n        try {\n            prepareNewPage(page.getDataEncoding(), page.getData().toInputStream());\n        } catch (IOException e) {\n            throw new IOException(\"could not read page \" + page + \" in col \" + descriptor, e);\n        }\n    }\n","sourceCodeStart":198,"sourceCodeEnd":234,"githubUrl":"https://github.com/apache/flink/blob/2f3c205e9266cb30240eb7f4fdab15cad629a70f/flink-formats/flink-parquet/src/main/java/org/apache/flink/formats/parquet/vector/reader/AbstractColumnReader.java#L198-L234","documentation":"IOException from readPageV1 in AbstractColumnReader: while extracting page bytes and initializing the repetition-level reader, run-length decoder, and value decoder (prepareNewPage), an IOException was thrown - malformed or truncated page payload for the column. The page and column descriptor are embedded in the message and the root cause is chained.","triggerScenarios":"DataPageV1.initFromPage/prepareNewPage failing while parsing page bytes for the given column descriptor - truncated page, corrupt compression stream, or values that violate the declared encoding.","commonSituations":"Truncated files from interrupted writes or partial uploads; bit rot / transfer corruption on object storage; compression codec mismatches between writer and reader (e.g. unsupported codec variant).","solutions":["Check the chained cause: EOF/truncation points to incomplete files, codec errors to compression mismatches","Re-copy or regenerate the file; verify checksums/Etags before reading","Ensure the compression codec used by the writer is on Flink's classpath and versions match","Isolate the bad split from the error message (col descriptor) and reprocess only that data"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"catch (IOException e) { if (e.getMessage() != null && e.getMessage().startsWith(\"could not read page\")) { if (isTransientStorageError(e.getCause())) { reDownloadOrRetrySplit(); } else { quarantineCorruptFile(path); } } else throw e; }","preventionTips":["Verify checksums/Etags after uploading Parquet files to object storage","Write files atomically; never expose partially written files to readers"],"tags":["parquet","corruption","io","page","flink"],"backgroundTag":null,"analyzedSha":"2f3c205e9266cb30240eb7f4fdab15cad629a70f","analyzedAt":"2026-08-14T08:48:24.518Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}