ivankelly commented on a change in pull request #1180: V2 decoder marks the 
reads index of the payload on write
URL: https://github.com/apache/bookkeeper/pull/1180#discussion_r169172349
 
 

 ##########
 File path: 
bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookieProtoEncoding.java
 ##########
 @@ -167,6 +167,9 @@ public Object decode(ByteBuf packet)
                 // Read ledger and entry id without advancing the reader index
                 ledgerId = packet.getLong(packet.readerIndex());
                 entryId = packet.getLong(packet.readerIndex() + 8);
+                // mark the reader index so that any resets will return to the
+                // start of the payload
+                packet.markReaderIndex();
 
 Review comment:
   Sure. I was looking there, but I put in the decoder because that's how it 
was in yahoo-4.3 branch. i'll leave it here, and remove the dependency on the 
behaviour in DbStorage too.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to