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_r179688328
 
 

 ##########
 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:
   @reddycharan 
   
   > my basic question is why do we need one more method - 
getCurrentLogChannel? why cannt we manage your testing needs with just one 
method here
   
   why `getCurrentLogChannel` is a problem to you? I don't really understand 
your concern here. are you concerning the method making your interface 
complicate or what? 
   
   as I said if you think this make your interface complicated, that mean your 
interface doesn't provide the right abstracted methods. The methods I am adding 
here is only for single entry log implementation, that says `currentLogId` and 
`currentLogChannel` should *ONLY* belong to single entry log implementation 
(which current EntryLogger is exactly implemented). 
   
   After #1281, these two methods should *ONLY* moved to single entry log 
implementation. You shouldn't consider implement these two methods with 
PerLedgerEntryLogManager, otherwise that means your interface defines wrong 
methods.

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