Re-enable dedicated schedulers
This commit is contained in:
parent
e34e1e5852
commit
b1d8e3e48e
@ -219,17 +219,20 @@ public class LLLocalKeyValueDatabase implements LLKeyValueDatabase {
|
||||
|
||||
int threadCap;
|
||||
if (databaseOptions.lowMemory()) {
|
||||
threadCap = Runtime.getRuntime().availableProcessors();
|
||||
threadCap = Math.max(1, Runtime.getRuntime().availableProcessors());
|
||||
|
||||
this.dbScheduler = Schedulers.boundedElastic();
|
||||
} else {
|
||||
// 8 or more
|
||||
threadCap = Math.max(8, Runtime.getRuntime().availableProcessors());
|
||||
|
||||
this.dbScheduler = Schedulers.newBoundedElastic(threadCap,
|
||||
Schedulers.DEFAULT_BOUNDED_ELASTIC_QUEUESIZE,
|
||||
"db-" + name,
|
||||
60,
|
||||
true
|
||||
);
|
||||
}
|
||||
this.dbScheduler = Schedulers.boundedElastic(); /*Schedulers.newBoundedElastic(threadCap,
|
||||
Schedulers.DEFAULT_BOUNDED_ELASTIC_QUEUESIZE,
|
||||
"db-" + name,
|
||||
60,
|
||||
true
|
||||
);*/
|
||||
this.enableColumnsBug = "true".equals(databaseOptions.extraFlags().getOrDefault("enableColumnBug", "false"));
|
||||
|
||||
createIfNotExists(descriptors, rocksdbOptions, inMemory, dbPath, dbPathString);
|
||||
|
@ -87,8 +87,8 @@ public class LLLocalLuceneIndex implements LLLuceneIndex {
|
||||
*/
|
||||
private static final ReentrantLock shutdownLock = new ReentrantLock();
|
||||
private static final Scheduler luceneHeavyTasksScheduler = uninterruptibleScheduler(Schedulers.single(Schedulers.boundedElastic()));
|
||||
//todo: remove after https://github.com/reactor/reactor-core/issues/2960 is fixed
|
||||
private static final Scheduler bulkScheduler = Schedulers.boundedElastic();
|
||||
private static final Scheduler bulkScheduler = uninterruptibleScheduler(Schedulers.newBoundedElastic(
|
||||
DEFAULT_BOUNDED_ELASTIC_SIZE, DEFAULT_BOUNDED_ELASTIC_QUEUESIZE, "bulkBoundedElastic", 60, true));
|
||||
|
||||
static {
|
||||
LLUtils.initHooks();
|
||||
|
Loading…
Reference in New Issue
Block a user