From 6a68c8452b718a6c1860e019c48077b101967f98 Mon Sep 17 00:00:00 2001 From: Andrea Cavalli Date: Tue, 1 Oct 2024 23:53:31 +0200 Subject: [PATCH] fix parallelism when listing live files --- .../database/collections/DatabaseMapDictionary.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/it/cavallium/dbengine/database/collections/DatabaseMapDictionary.java b/src/main/java/it/cavallium/dbengine/database/collections/DatabaseMapDictionary.java index 0eaf4d8..eefe956 100644 --- a/src/main/java/it/cavallium/dbengine/database/collections/DatabaseMapDictionary.java +++ b/src/main/java/it/cavallium/dbengine/database/collections/DatabaseMapDictionary.java @@ -571,9 +571,9 @@ public class DatabaseMapDictionary extends DatabaseMapDictionaryDeep Stream>> getAllEntriesFastUnsafe(DatabaseMapDictionary dict, BiConsumer, Throwable> deserializationErrorHandler) { try { - return ((LLLocalDictionary) dict.dictionary) - .getAllLiveFiles() - .sequential() + var liveFiles = StreamUtils.toListOn(dict.getDbReadPool(), + ((LLLocalDictionary) dict.dictionary).getAllLiveFiles()); + return liveFiles.stream() .map(file -> file.iterate(new SSTRangeFull()).map(state -> switch (state) { case RocksDBFileIterationStateBegin rocksDBFileIterationStateBegin: yield null;