apache/flink · error · RuntimeException
Committable to compact has no content.
Error message
Committable to compact has no content.
What it means
Thrown by packAndTrigger in CompactCoordinator when a FileSinkCommittable arrives that has no pending file, no in-progress file to clean up, and no compacted file to clean up. This is an invalid/empty committable state that the coordinator cannot process. It is a defensive guard in @Internal code against unexpected committable states.
Source
Thrown at flink-connectors/flink-connector-files/src/main/java/org/apache/flink/connector/file/sink/compactor/operator/CompactCoordinator.java:117
}
}
// or message instanceof CommittableSummary
// info in CommittableSummary is not necessary for compacting at present, ignore it
}
private boolean packAndTrigger(FileSinkCommittable committable) {
String bucketId = committable.getBucketId();
CompactorRequest bucketRequest =
packingRequests.computeIfAbsent(bucketId, CompactorRequest::new);
if (committable.hasInProgressFileToCleanup() || committable.hasCompactedFileToCleanup()) {
checkState(!committable.hasPendingFile());
// cleanup request, pass through directly
bucketRequest.addToPassthrough(committable);
return false;
}
if (!committable.hasPendingFile()) {
throw new RuntimeException("Committable to compact has no content.");
}
CompactTrigger trigger =
triggers.computeIfAbsent(bucketId, id -> new CompactTrigger(strategy));
CompactTriggerResult triggerResult = trigger.onElement(committable);
switch (triggerResult) {
case PASS_THROUGH:
bucketRequest.addToPassthrough(committable);
return false;
case CONTINUE:
bucketRequest.addToCompact(committable);
return false;
case FIRE_AND_PURGE:
bucketRequest.addToCompact(committable);
return true;
default:
throw new RuntimeException("Unexpected trigger result:" + triggerResult);
}View on GitHub (pinned to 2f3c205e92)
Solutions
- Check if the state was corrupted during storage or restore (disk errors, network issues).
- Verify the checkpoint/savepoint was produced by a compatible FileSink version.
- If the error persists, report as a Flink bug with the full stack trace and state details.
- As a last resort, start from a clean state without restoring from the problematic checkpoint.
Defensive patterns
Strategy: try-catch
Validate before calling
// No user-facing validation possible — this is an internal defensive guard. // Ensure state was produced by a compatible FileSink version before restore.
Try / catch
try {
coordinator.processElement(element);
} catch (RuntimeException e) {
if (e.getMessage().equals("Committable to compact has no content.")) {
// internal state corruption — inspect checkpoint integrity
// may need to start from a clean state
}
throw e;
} Prevention
- Verify checkpoint/savepoint integrity before restore.
- Ensure Flink version compatibility when restoring FileSink state.
- Report persistent occurrences as a Flink bug with full stack trace.
When it happens
Trigger: A FileSinkCommittable is deserialized or constructed in a state where all content fields (pendingFile, inProgressFileToCleanup, compactedFileToCleanup) are null/absent. This could happen due to state corruption during restore, a bug in the committable construction logic, or an incompatible state from a different sink version.
Common situations: State was corrupted or restored from an incompatible Flink version; extremely rare under normal operation. This is an internal defensive guard, not a user-configurable error path.
Related errors
- Unexpected trigger result:{triggerResult}
- Unrecognized version or corrupt state: {version}
- Corrupt data: Unexpected magic number %08X
- At least one trigger condition must be configured.
- URL is invalid. This should not happen.
AI-assisted analysis of apache/flink@2f3c205e92 (2026-08-14).
Data as JSON: /api/errors/bb33f75ea003b504.
Report an issue: GitHub.