hangc0276 commented on code in PR #3810:
URL: https://github.com/apache/bookkeeper/pull/3810#discussion_r1118252231
##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/checksum/DigestManager.java:
##########
@@ -158,6 +161,18 @@ private void verifyDigest(long entryId, ByteBuf
dataReceived) throws BKDigestMat
verifyDigest(entryId, dataReceived, false);
}
+ private static final FastThreadLocal<ByteBuf> DIGEST_BUFFER = new
FastThreadLocal<ByteBuf>() {
+ @Override
+ protected ByteBuf initialValue() throws Exception {
+ return PooledByteBufAllocator.DEFAULT.directBuffer(1024);
Review Comment:
The required ByteBuf size for each digest manager:
CRC32CDigestManager -> 4
CRC32DigestManager -> 8
DummyDigestManager -> 0
MacDigestManager -> 20
Do we need to allocate 1024 bytes?
--
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]