sijie commented on a change in pull request #1319:  Issue 1316: A bookie with 
non-writable dirs should be able to start in readonly mode
URL: https://github.com/apache/bookkeeper/pull/1319#discussion_r179678494
 
 

 ##########
 File path: 
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/EntryLogger.java
 ##########
 @@ -398,7 +401,11 @@ synchronized long getLeastUnflushedLogId() {
     }
 
     synchronized long getCurrentLogId() {
-        return logChannel.getLogId();
+        return currentLogId;
+    }
+
+    BufferedLogChannel getCurrentLogChannel() {
 
 Review comment:
   we can't just use `currentLogId` for testing the behavior of defer creation. 
defer creation means the `currentLogChannel` is null.
   
   currentLogId and currentLogChannel are single entry log manager stuffs. they 
should not be part of the interface, that's what I suggested in our discussion, 
hiding all the log id stuffs in the implementation. If you follow that 
suggestion, the currentLogId and currentLogChannel should be just 
package-protected methods in single entry log manager, and the test 
EntryLogTest should be changed to test single entry log manager rather than 
entry logger.

----------------------------------------------------------------
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