apache/iceberg · warning
Failed to notify event listeners
Error message
Failed to notify event listeners
What it means
After a snapshot commit completes, SnapshotProducer.commit() fires listener events (e.g. commit metrics/reporting callbacks). If notifyListeners() throws any Throwable, it is caught and logged as this warning. The commit itself has already succeeded; only event notification to registered listeners failed.
Solutions
- Inspect the attached stack trace to find which listener threw.
- Fix or wrap the faulty listener's onCommit handler so it does not throw.
- Guard external calls inside listeners (timeouts, retries) so monitoring outages don't produce warnings on every commit.
- If the listener is unnecessary, deregister it.
Example fix
// before
Events.listeners().add(listener -> { metricsClient.post(listener); }); // throws on outage
// after
Events.listeners().add(listener -> {
try { metricsClient.post(listener); } catch (Exception e) { log.warn("metrics post failed", e); }
}); Defensive patterns
Strategy: try-catch
Try / catch
try {
table.newAppend().appendFile(file).commit();
} catch (Throwable t) {
LOG.warn("commit succeeded but event notification failed; verify listeners", t);
} Prevention
- Keep listener implementations exception-free with internal try/catch
- Add timeouts/retries to any external calls made inside listeners
- Test listeners against the event/report API version in use
- Deregister listeners that are not needed
When it happens
Trigger: A registered Events.Listener (via org.apache.iceberg.events.Events) throws during a commit callback, or updateEvent()/metrics construction fails inside notifyListeners during commit().
Common situations: Custom listener implementations with bugs (NPEs, downstream HTTP calls failing); listeners that do network reporting to monitoring systems that are down; listener code incompatible with the event summary shape.
Understand the failure class
Background: 'Something went wrong' / 'Request failed (500)' / 'HTTP error! status: 404' — what failed HTTP requests actually mean and how to find the real cause — this error's family across 28 libraries.
Related errors
- Can't index multiple DVs for
- Cannot call commit on temporary table operations
- Cannot call commit on temporary table operations
- Cannot call commit on temporary table operations
- Cannot call commit on temporary table operations
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/be84db3613419f05.
Report an issue: GitHub.
Appendix: source
Thrown at core/src/main/java/org/apache/iceberg/SnapshotProducer.java:568
deleteFile(manifestList);
}
}
} else {
// saved may not be present if the latest metadata couldn't be loaded due to eventual
// consistency problems in refresh. in that case, don't clean up.
LOG.warn("Failed to load committed snapshot, skipping manifest clean-up");
}
} catch (Throwable e) {
LOG.warn(
"Failed to load committed table metadata or during cleanup, skipping further cleanup",
e);
}
}
try {
notifyListeners();
} catch (Throwable e) {
LOG.warn("Failed to notify event listeners", e);
}
}
private void notifyListeners() {
try {
Object event = updateEvent();
if (event != null) {
Listeners.notifyAll(event);
if (event instanceof CreateSnapshotEvent) {
CreateSnapshotEvent createSnapshotEvent = (CreateSnapshotEvent) event;
reporter.report(
ImmutableCommitReport.builder()
.tableName(createSnapshotEvent.tableName())
.snapshotId(createSnapshotEvent.snapshotId())
.operation(createSnapshotEvent.operation())
.sequenceNumber(createSnapshotEvent.sequenceNumber())View on GitHub (pinned to 86d9c8fc54)