hangc0276 commented on code in PR #3956:
URL: https://github.com/apache/bookkeeper/pull/3956#discussion_r1200242610
##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Journal.java:
##########
@@ -827,22 +828,32 @@ public long scanJournal(long journalId, long journalPos,
JournalScanner scanner)
}
boolean isPaddingRecord = false;
if (len < 0) {
- if (len == PADDING_MASK && journalVersion >=
JournalChannel.V5) {
- // skip padding bytes
- lenBuff.clear();
- fullRead(recLog, lenBuff);
- if (lenBuff.remaining() != 0) {
- break;
+ try {
+ if (len == PADDING_MASK && journalVersion >=
JournalChannel.V5) {
+ // skip padding bytes
+ lenBuff.clear();
+ fullRead(recLog, lenBuff);
+ if (lenBuff.remaining() != 0) {
+ break;
+ }
+ lenBuff.flip();
Review Comment:
I caught all the `fullRead` throw exceptions.
--
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]