Limit cached indexwriters

This commit is contained in:
Andrea Cavalli 2021-09-06 15:08:07 +02:00
parent d5964a7bed
commit 16bd3b263b

View File

@ -61,6 +61,8 @@ public class PooledIndexSearcherManager {
this.cachedSnapshotSearchers = CacheBuilder.newBuilder()
.expireAfterWrite(queryRefreshDebounceTime)
// Max 3 cached non-main index writers
.maximumSize(3)
.build(new CacheLoader<>() {
@Override
public Mono<IndexSearcher> load(@NotNull LLSnapshot snapshot) {