ArvinDevel commented on code in PR #3194:
URL: https://github.com/apache/bookkeeper/pull/3194#discussion_r927472583
##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/JournalChannel.java:
##########
@@ -177,7 +190,21 @@ private JournalChannel(File journalDirectory, long logId,
}
fc = channel.getFileChannel();
formatVersion = formatVersionToWrite;
+ bc = bcBuilder.create(fc, writeBufferSize);
+ } else { // open an existing file
+ fc = channel.getFileChannel();
+ formatVersion = formatVersionToWrite;
+ }
+ if (fRemoveFromPageCache) {
+ this.fd = NativeIO.getSysFileDescriptor(channel.getFD());
+ } else {
+ this.fd = -1;
+ }
+ }
+ public void writeHeader() throws IOException {
+ try {
+ bc = bcBuilder.create(fc, writeBufferSize);
Review Comment:
the `bc` is already created at line 193, right? if so, I think this line is
redundant.
--
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]