[improve][server] Support entryLogPerLedger, when dbStorage_directIOEntryLogger=true
Motivation
When dbStorage_directIOEntryLogger=true, support for entryLogPerLedger.
Changes
- Add a new DirectEntryLoggerForEntryLogPerLedger class extended from DirectEntryLogger;
- 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);
}
@eolivelli @hangc0276 @StevenLuMT PTAL,thanks!
Would you please add a test to cover it?
OK, I will fix
rerun failure checks
Would you please add a test to cover it?
Fixed,PTAL,thanks! @hangc0276
Would you please add a test to cover it?
Fixed,PTAL,thanks! @hangc0276
PTAL,thanks! @hangc0276 @eolivelli @StevenLuMT
Ping @hangc0276
ping @hangc0276
ping @hangc0276
@lordcheng10 I'm reviewing this Pr, thanks.
ping @hangc0276
@lordcheng10 I'm reviewing this Pr, thanks.
OK,thank you !