wenbingshen commented on code in PR #3598:
URL: https://github.com/apache/bookkeeper/pull/3598#discussion_r1011226656
##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/BookieImpl.java:
##########
@@ -931,6 +931,18 @@ private Journal getJournal(long ledgerId) {
return journals.get(MathUtils.signSafeMod(ledgerId, journals.size()));
}
+ @VisibleForTesting
+ public ByteBuf createMasterKeyEntry(long ledgerId, byte[] masterKey) {
+ // new handle, we should add the key to journal ensure we can rebuild
+ ByteBuffer bb = ByteBuffer.allocate(8 + 8 + 4 + masterKey.length);
Review Comment:
@merlimat Great understanding! Thanks for your review and suggestion. I have
used a pooled ByteBuf instead of wrapping a ByteBuffer. :)
--
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]