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