karanmehta93 commented on a change in pull request #2177: Journal scan should
throw IOException when it reads negative length
URL: https://github.com/apache/bookkeeper/pull/2177#discussion_r334779546
##########
File path:
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Journal.java
##########
@@ -812,7 +812,8 @@ public long scanJournal(long journalId, long journalPos,
JournalScanner scanner)
}
isPaddingRecord = true;
} else {
- throw new IOException("Invalid record found with
negative length : " + len);
+ LOG.error("Invalid record found with negative length:
{}", len);
+ throw new IOException();
Review comment:
Updated it.
On a side note, I understand the test is not the cleanest approach for doing
things, however I took some liberty since its test-only code.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services