prestodb/presto · error · OrcCorruptionException
Checkpoints are corrupt
Error message
Checkpoints are corrupt
What it means
ORC stripe-reading error in StripeReader.readStripe: building row groups from the stripe's checkpoint/index data threw InvalidCheckpointException — the row-index checkpoints are inconsistent with the actual stream positions. Wrapped as 'Checkpoints are corrupt', indicating a corrupted or writer-buggy stripe index.
Source
Thrown at presto-orc/src/main/java/com/facebook/presto/orc/StripeReader.java:246
// build the row groups
try {
List<RowGroup> rowGroups = createRowGroups(
stripe.getNumberOfRows(),
includedStreams,
valueStreams,
columnIndexes,
selectedRowGroups,
columnEncodings);
return new Stripe(stripe.getNumberOfRows(), columnEncodings, rowGroups, dictionaryStreamSources, timezone);
}
catch (InvalidCheckpointException e) {
// The ORC file contains a corrupt checkpoint stream
// If the file does not have a row group dictionary, treat the stripe as a single row group. Otherwise,
// we must fail because the length of the row group dictionary is contained in the checkpoint stream.
if (hasRowGroupDictionary) {
throw new OrcCorruptionException(e, orcDataSource.getId(), "Checkpoints are corrupt");
}
invalidCheckPoint = true;
}
}
// stripe only has one row group and no dictionary
ImmutableMap.Builder<StreamId, DiskRange> diskRangesBuilder = ImmutableMap.builder();
for (Entry<StreamId, DiskRange> entry : getDiskRanges(allStreams).entrySet()) {
StreamId streamId = entry.getKey();
if (includedStreams.containsKey(streamId)) {
diskRangesBuilder.put(entry);
}
}
ImmutableMap<StreamId, DiskRange> diskRanges = diskRangesBuilder.build();
// read the file regions
Map<StreamId, OrcInputStream> streamsData = readDiskRanges(stripeId, diskRanges, systemMemoryUsage, decryptors, sharedDecompressionBuffer);
View on GitHub (pinned to 55bb57d202)
Solutions
- Skip or rewrite the corrupted file
- Verify with an external ORC tool whether the stripe index is valid
- Report as a writer bug if the file was produced by Presto itself
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at presto-orc/src/main/java/com/facebook/presto/orc/StripeReader.java:246 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/c22f6bb2b4a8190e.
Report an issue: GitHub.