You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 15, 2024. It is now read-only.
Please describe the feature you are requesting.
Profiling shows the code block in bold is hit every time an entry is read from bookie.
@Override
public void update(ByteBuf buf) {
int index = buf.readerIndex();
int length = buf.readableBytes();
try {
if (buf.hasMemoryAddress()) {
// Calculate CRC directly from the direct memory pointer
crcValue = (int) updateByteBuffer.invoke(null, crcValue, buf.memoryAddress(), index, length);
} else if (buf.hasArray()) {
// Use the internal method to update from array based
crcValue = (int) updateBytes.invoke(null, crcValue, buf.array(), buf.arrayOffset() + index, length);
} else {
**// Fallback to data copy if buffer is not contiguous
byte[] b = new byte[length];
buf.getBytes(index, b, 0, length);
crcValue = (int) updateBytes.invoke(null, crcValue, b, 0, b.length);**
}
} catch (IllegalAccessException | InvocationTargetException e) {
throw new RuntimeException(e);
}
}
This is due to ByteBuf being marked as read only (as a result buf.hasArray() == false) from
Indicate the importance of this issue to you (blocker, must-have, should-have, nice-to-have).
Are you currently using any workarounds to address this issue?
This generates lots of garbage. See attached image. Would be nice to get your thoughts on this issue, maybe using a buffer pool.
Provide any additional detail on your proposed use case for this feature.
The text was updated successfully, but these errors were encountered:
Original Issue: apache#2064
FEATURE REQUEST
Profiling shows the code block in bold is hit every time an entry is read from bookie.
This is due to ByteBuf being marked as read only (as a result buf.hasArray() == false) from
Are you currently using any workarounds to address this issue?
This generates lots of garbage. See attached image. Would be nice to get your thoughts on this issue, maybe using a buffer pool.
The text was updated successfully, but these errors were encountered: