lordcheng10 opened a new pull request, #3681:
URL: https://github.com/apache/bookkeeper/pull/3681

   ### Motivation
   When dbStorage_directIOEntryLogger=true, add support for entryLogPerLedger.
   
   
   ### Changes
   1. Add a new DirectEntryLoggerForEntryLogPerLedger class extended from 
DirectEntryLogger;
   2. In DbLedgerStorage, when building the EntryLogger object, judge whether 
entryLogPerLedgerEnabled is enabled:
   ```
    if (conf.isEntryLogPerLedgerEnabled()) {
                       entrylogger = new 
DirectEntryLoggerForEntryLogPerLedger(conf, ledgerDir,
                               new EntryLogIdsImpl(ledgerDirsManager, slog),
                               new NativeIOImpl(),
                               allocator, entryLoggerWriteExecutor, 
entryLoggerFlushExecutor,
                               conf.getEntryLogSizeLimit(),
                               conf.getNettyMaxFrameSizeBytes() - 500,
                               perDirectoryTotalWriteBufferSize,
                               perDirectoryTotalReadBufferSize,
                               readBufferSize,
                               numReadThreads,
                               maxFdCacheTimeSeconds,
                               slog, statsLogger);
                   } else {
                       entrylogger = new DirectEntryLogger(ledgerDir, new 
EntryLogIdsImpl(ledgerDirsManager, slog),
                               new NativeIOImpl(),
                               allocator, entryLoggerWriteExecutor, 
entryLoggerFlushExecutor,
                               conf.getEntryLogSizeLimit(),
                               conf.getNettyMaxFrameSizeBytes() - 500,
                               perDirectoryTotalWriteBufferSize,
                               perDirectoryTotalReadBufferSize,
                               readBufferSize,
                               numReadThreads,
                               maxFdCacheTimeSeconds,
                               slog, statsLogger);
                   }
   ```
   


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

Reply via email to