You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by "zymap (via GitHub)" <gi...@apache.org> on 2023/06/16 03:01:28 UTC
[GitHub] [bookkeeper] zymap commented on a diff in pull request #3985: Unify ByteBufAllocator for the DirectIO component
zymap commented on code in PR #3985:
URL: https://github.com/apache/bookkeeper/pull/3985#discussion_r1231727977
##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/storage/directentrylogger/Buffer.java:
##########
@@ -60,21 +60,23 @@ class Buffer {
final int bufferSize;
ByteBuf buffer;
ByteBuffer byteBuffer;
+ ByteBufAllocator allocator;
long pointer = 0;
- Buffer(NativeIO nativeIO, int bufferSize) throws IOException {
+ Buffer(NativeIO nativeIO, ByteBufAllocator allocator, int bufferSize) throws IOException {
checkArgument(isAligned(bufferSize),
"Buffer size not aligned %d", bufferSize);
this.buffer = allocateAligned(ALIGNMENT, bufferSize);
this.nativeIO = nativeIO;
this.bufferSize = bufferSize;
+ this.allocator = allocator;
Review Comment:
Need to declare at line 69. The `allocateAligned` uses the allocator.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@bookkeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org