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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]