You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iceberg.apache.org by bl...@apache.org on 2022/05/02 19:26:54 UTC
[iceberg] branch master updated: Core: Fix table corruption from OOM during commit cleanup (#4673)
This is an automated email from the ASF dual-hosted git repository.
blue pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iceberg.git
The following commit(s) were added to refs/heads/master by this push:
new 9ec7a8fcd Core: Fix table corruption from OOM during commit cleanup (#4673)
9ec7a8fcd is described below
commit 9ec7a8fcd766e68c9fd22122ac1594da734877e2
Author: Ryan Blue <bl...@apache.org>
AuthorDate: Mon May 2 12:26:48 2022 -0700
Core: Fix table corruption from OOM during commit cleanup (#4673)
---
.../src/main/java/org/apache/iceberg/SnapshotProducer.java | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/core/src/main/java/org/apache/iceberg/SnapshotProducer.java b/core/src/main/java/org/apache/iceberg/SnapshotProducer.java
index 80afb04e5..08a61b39f 100644
--- a/core/src/main/java/org/apache/iceberg/SnapshotProducer.java
+++ b/core/src/main/java/org/apache/iceberg/SnapshotProducer.java
@@ -323,9 +323,9 @@ abstract class SnapshotProducer<ThisT> implements SnapshotUpdate<ThisT> {
Exceptions.suppressAndThrow(e, this::cleanAll);
}
- LOG.info("Committed snapshot {} ({})", newSnapshotId.get(), getClass().getSimpleName());
-
try {
+ LOG.info("Committed snapshot {} ({})", newSnapshotId.get(), getClass().getSimpleName());
+
// at this point, the commit must have succeeded. after a refresh, the snapshot is loaded by
// id in case another commit was added between this commit and the refresh.
Snapshot saved = ops.refresh().snapshot(newSnapshotId.get());
@@ -343,11 +343,15 @@ abstract class SnapshotProducer<ThisT> implements SnapshotUpdate<ThisT> {
LOG.warn("Failed to load committed snapshot, skipping manifest clean-up");
}
- } catch (RuntimeException e) {
- LOG.warn("Failed to load committed table metadata, skipping manifest clean-up", e);
+ } catch (Throwable e) {
+ LOG.warn("Failed to load committed table metadata or during cleanup, skipping further cleanup", e);
}
- notifyListeners();
+ try {
+ notifyListeners();
+ } catch (Throwable e) {
+ LOG.warn("Failed to notify event listeners", e);
+ }
}
private void notifyListeners() {