You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by ch...@apache.org on 2023/04/14 14:23:44 UTC

[bookkeeper] branch branch-4.16 updated: [fix] DigestManager should not advance readerIndex (#3919)

This is an automated email from the ASF dual-hosted git repository.

chenhang pushed a commit to branch branch-4.16
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git


The following commit(s) were added to refs/heads/branch-4.16 by this push:
     new 424ec12541 [fix] DigestManager should not advance readerIndex (#3919)
424ec12541 is described below

commit 424ec12541371645ecb3ad0c8f524ec138a613e5
Author: Michael Marshall <mm...@apache.org>
AuthorDate: Fri Apr 14 07:22:12 2023 -0500

    [fix] DigestManager should not advance readerIndex (#3919)
    
    (cherry picked from commit df4492012cc03682534cbc8dd68dd81163b0c947)
---
 .../main/java/org/apache/bookkeeper/proto/checksum/DigestManager.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/checksum/DigestManager.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/checksum/DigestManager.java
index 9f931f731a..eab33945b1 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/checksum/DigestManager.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/checksum/DigestManager.java
@@ -159,7 +159,7 @@ public abstract class DigestManager {
         buf.readerIndex(0);
 
         if (isSmallEntry) {
-            buf.writeBytes(unwrapped);
+            buf.writeBytes(unwrapped, unwrapped.readerIndex(), unwrapped.readableBytes());
             unwrapped.release();
             return buf;
         } else {