Skip to content

Commit

Permalink
Fix memory leaking when loading data
Browse files Browse the repository at this point in the history
  • Loading branch information
Haoning-Sun committed Jul 11, 2023
1 parent c237203 commit 943518c
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -347,12 +347,11 @@ public CompletableFuture<List<BlockStatus>> load(List<Block> blocks, UfsReadOpti
blockWriter.close();
} catch (IOException e) {
throw AlluxioRuntimeException.from(e);
} finally {
NioDirectBufferPool.release(buf);
}
})
.thenRun(() -> commitBlock(sessionId, blockId, false))
.exceptionally(t -> {
NioDirectBufferPool.release(buf);
handleException(t.getCause(), block, errors, sessionId);
return null;
});
Expand Down

0 comments on commit 943518c

Please sign in to comment.