merlimat commented on code in PR #3810:
URL: https://github.com/apache/bookkeeper/pull/3810#discussion_r1118280297


##########
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:
   Just in case. Though this is only used for MAC at this point, and one per 
thread. It shouldn't be any noticeable waste. 



-- 
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]

Reply via email to