sijie commented on a change in pull request #1201: ISSUE #570: Entrylog per 
ledger
URL: https://github.com/apache/bookkeeper/pull/1201#discussion_r170560575
 
 

 ##########
 File path: 
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/EntryLogger.java
 ##########
 @@ -386,12 +412,37 @@ public BufferedReadChannel getFromChannels(long logId) {
      *
      * @return least unflushed log id.
      */
-    synchronized long getLeastUnflushedLogId() {
-        return leastUnflushedLogId;
+    long getLeastUnflushedLogId() {
+        return recentlyCreatedEntryLogsStatus.getLeastUnflushedLogId();
     }
 
-    synchronized long getCurrentLogId() {
-        return logChannel.getLogId();
+    long getPreviousAllocatedEntryLogId() {
+        return entryLoggerAllocator.getPreallocatedLogId();
+    }
+
+    boolean rollLogsIfEntryLogLimitReached() throws IOException {
 
 Review comment:
   I think this method should belong to EntryLogManager. so you don't need to 
expose `getCopyOfCurrentLogs()` to EntryLogger. for the simple entry log 
manager, you don't need to covert it back to a HashSet and do the while loop 
here.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to