Skip to content

Commit

Permalink
Free the chunks in case of failure
Browse files Browse the repository at this point in the history
  • Loading branch information
malhotrashivam committed Jun 4, 2024
1 parent 0c87091 commit f94d46c
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1555,6 +1555,8 @@ private static boolean serializeAllTable(
if (!(err instanceof SnapshotUnsuccessfulException)) {
throw new SnapshotUnsuccessfulException("Snapshot failed", err);
}
// Free any resources that may have been allocated
snapshot.close();
return false;
}
} catch (final InterruptedException e) {
Expand All @@ -1581,7 +1583,7 @@ private static boolean serializeAllTable(


/**
* Check if all the required columns are {@link InMemoryColumnSource}.
* Check if all the required column sources are {@link InMemoryColumnSource}.
*/
private static boolean allColumnSourcesInMemory(
@NotNull final Table table,
Expand Down

0 comments on commit f94d46c

Please sign in to comment.