You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2018/04/20 23:43:49 UTC

[GitHub] nicmichael commented on a change in pull request #1361: Issue #791: Eliminate byte[] copies in AddEntry code path

nicmichael commented on a change in pull request #1361: Issue #791: Eliminate byte[] copies in AddEntry code path
URL: https://github.com/apache/bookkeeper/pull/1361#discussion_r183190215
 
 

 ##########
 File path: bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/checksum/DigestManager.java
 ##########
 @@ -57,22 +67,30 @@ void update(byte[] data) {
 
     final int macCodeLength;
 
-    public DigestManager(long ledgerId) {
+    public DigestManager(long ledgerId, ByteBufAllocator byteBufAllocator) {
         this.ledgerId = ledgerId;
+        this.byteBufAllocator = byteBufAllocator;
         macCodeLength = getMacCodeLength();
     }
 
     public static DigestManager instantiate(long ledgerId, byte[] passwd, DigestType digestType)
             throws GeneralSecurityException {
+        return instantiate(ledgerId, passwd, digestType, false);
+    }
+
+    public static DigestManager instantiate(long ledgerId, byte[] passwd, DigestType digestType,
+            boolean useDirectBufferAllocator) throws GeneralSecurityException {
 
 Review comment:
   Oh yes, I suppose so. I shouldn't have done that last change and should have stayed with Unpooled. Will revert again.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services