Fix parallelism bug

This commit is contained in:
Andrea Cavalli 2024-10-01 23:44:16 +02:00
parent e1e6065036
commit c859b8238f

View File

@ -571,10 +571,9 @@ public class DatabaseMapDictionary<T, U> extends DatabaseMapDictionaryDeep<T, U,
public static <T, U> Stream<Stream<Entry<T, U>>> getAllEntriesFastUnsafe(DatabaseMapDictionary<T, U> dict,
BiConsumer<Entry<Buf, Buf>, Throwable> deserializationErrorHandler) {
try {
Comparator<RocksDBFile> comparator = Comparator.<RocksDBFile>comparingInt(x -> x.getMetadata().level()).reversed();
return ((LLLocalDictionary) dict.dictionary)
.getAllLiveFiles()
.sorted(comparator)
.sequential()
.map(file -> file.iterate(new SSTRangeFull()).map(state -> switch (state) {
case RocksDBFileIterationStateBegin rocksDBFileIterationStateBegin:
yield null;