Skip to content

Commit

Permalink
Fix memory leaking when loading data
Browse files Browse the repository at this point in the history
Cherry-pick of existing commit.
orig-pr: #17758
orig-commit: 2b83d95
orig-commit-author: Haoning Sun <msunhaoning@163.com>

			pr-link: #18592
			change-id: cid-b5e9e655aff744b04d3187687a62dbaed6754186
  • Loading branch information
alluxio-bot authored Apr 28, 2024
1 parent 0d22591 commit 550ccc1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -343,12 +343,12 @@ 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))
.thenRun(() -> NioDirectBufferPool.release(buf))
.exceptionally(t -> {
NioDirectBufferPool.release(buf);
handleException(t.getCause(), block, errors, sessionId);
return null;
});
Expand Down

0 comments on commit 550ccc1

Please sign in to comment.