Configurable log path, configurable wal path
This commit is contained in:
parent
3a7b1498ff
commit
22f0711ab8
@ -255,6 +255,8 @@ versions:
|
||||
spinning: boolean
|
||||
defaultColumnOptions: DefaultColumnOptions
|
||||
columnOptions: NamedColumnOptions[]
|
||||
logPath: -String
|
||||
walPath: -String
|
||||
# Remember to update ColumnOptions common getters
|
||||
DefaultColumnOptions:
|
||||
data:
|
||||
|
@ -57,7 +57,9 @@ public class DefaultDatabaseOptions {
|
||||
Nullablelong.empty(),
|
||||
false,
|
||||
DEFAULT_DEFAULT_COLUMN_OPTIONS,
|
||||
List.of()
|
||||
List.of(),
|
||||
NullableString.empty(),
|
||||
NullableString.empty()
|
||||
);
|
||||
|
||||
public static DatabaseOptionsBuilder builder() {
|
||||
|
@ -102,7 +102,7 @@ public class CachedIndexSearcherManager implements IndexSearcherManager {
|
||||
|
||||
this.closeMono = Mono
|
||||
.fromRunnable(() -> {
|
||||
logger.info("Closing IndexSearcherManager...");
|
||||
logger.debug("Closing IndexSearcherManager...");
|
||||
this.closeRequested.set(true);
|
||||
this.closeRequestedMono.tryEmitEmpty();
|
||||
})
|
||||
|
@ -789,6 +789,12 @@ public class LLLocalKeyValueDatabase implements LLKeyValueDatabase {
|
||||
} else {
|
||||
options.setDelayedWriteRate(64 * SizeUnit.MB);
|
||||
}
|
||||
if (databaseOptions.logPath().isPresent()) {
|
||||
options.setDbLogDir(databaseOptions.logPath().get());
|
||||
}
|
||||
if (databaseOptions.walPath().isPresent()) {
|
||||
options.setWalDir(databaseOptions.walPath().get());
|
||||
}
|
||||
options.setCreateIfMissing(true);
|
||||
options.setSkipStatsUpdateOnDbOpen(true);
|
||||
options.setCreateMissingColumnFamilies(true);
|
||||
@ -869,8 +875,8 @@ public class LLLocalKeyValueDatabase implements LLKeyValueDatabase {
|
||||
// HIGH MEMORY
|
||||
options
|
||||
//.setDbWriteBufferSize(64 * SizeUnit.MB)
|
||||
.setBytesPerSync(0)
|
||||
.setWalBytesPerSync(0)
|
||||
.setBytesPerSync(64 * SizeUnit.MB)
|
||||
.setWalBytesPerSync(64 * SizeUnit.MB)
|
||||
|
||||
.setWalTtlSeconds(0) // Auto
|
||||
.setWalSizeLimitMB(0) // Auto
|
||||
|
@ -483,9 +483,9 @@ public class LLLocalLuceneIndex implements LLLuceneIndex {
|
||||
public Mono<Void> close() {
|
||||
return Mono
|
||||
.<Void>fromCallable(() -> {
|
||||
logger.info("Waiting IndexWriter tasks...");
|
||||
logger.debug("Waiting IndexWriter tasks...");
|
||||
activeTasks.arriveAndAwaitAdvance();
|
||||
logger.info("IndexWriter tasks ended");
|
||||
logger.debug("IndexWriter tasks ended");
|
||||
return null;
|
||||
})
|
||||
.subscribeOn(luceneHeavyTasksScheduler)
|
||||
|
Loading…
x
Reference in New Issue
Block a user