reddycharan commented on a change in pull request #1281: Issue #570: Introducing EntryLogManager. URL: https://github.com/apache/bookkeeper/pull/1281#discussion_r180658981
########## File path: bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/EntryLogger.java ########## @@ -880,39 +1195,6 @@ protected ByteBuf initialValue() throws Exception { } }; - public synchronized long addEntry(long ledger, ByteBuf entry, boolean rollLog) throws IOException { - if (null == logChannel) { - // log channel can be null because the file is deferred to be created when no writable ledger directory - // is available. - createNewLog(); - } - - int entrySize = entry.readableBytes() + 4; // Adding 4 bytes to prepend the size - boolean reachEntryLogLimit = - rollLog ? reachEntryLogLimit(entrySize) : readEntryLogHardLimit(entrySize); - // Create new log if logSizeLimit reached or current disk is full - boolean createNewLog = shouldCreateNewEntryLog.get(); Review comment: i removed the need of LedgerDirsListener in EntryLogger. Instead in EntryLogManagerBase.addEntry, I check if dir is full boolean diskFull = (logChannel == null) ? false : ledgerDirsManager.isDirFull(logChannel.getLogFile().getParentFile()); and diskFull will be used for determining if newlog needs to be created or not ---------------------------------------------------------------- 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