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

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

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

eolivelli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git


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

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

    [fix] DigestManager should not advance readerIndex (#3919)
---
 .../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 {