Skip to content

Commit

Permalink
backport apache#5126 to close compressor and avoid memory leak (found…
Browse files Browse the repository at this point in the history
… in Flink iceberg connector) (apache#40)
  • Loading branch information
zzhhhzz committed Apr 17, 2023
1 parent 632c0a9 commit 9931da1
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,12 @@ public void close() throws IOException {
this.closed = true;
flushRowGroup(true);
writeStore.close();
writer.end(metadata);
if (writer != null) {
writer.end(metadata);
}
if (compressor != null) {
compressor.release();
}
}
}
}

0 comments on commit 9931da1

Please sign in to comment.