From 3f78e5fec9b10eb5a03ebae39af4c83ce0dfcab6 Mon Sep 17 00:00:00 2001 From: Andrea Cavalli Date: Sat, 13 Feb 2021 00:45:16 +0100 Subject: [PATCH] Update LLLocalDictionary.java --- .../cavallium/dbengine/database/disk/LLLocalDictionary.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/it/cavallium/dbengine/database/disk/LLLocalDictionary.java b/src/main/java/it/cavallium/dbengine/database/disk/LLLocalDictionary.java index 5e79d4b..fd90268 100644 --- a/src/main/java/it/cavallium/dbengine/database/disk/LLLocalDictionary.java +++ b/src/main/java/it/cavallium/dbengine/database/disk/LLLocalDictionary.java @@ -47,7 +47,7 @@ public class LLLocalDictionary implements LLDictionary { static final int MULTI_GET_WINDOW = 500; static final WriteOptions BATCH_WRITE_OPTIONS = new WriteOptions().setLowPri(true); - private static final int STRIPES = 256; + private static final int STRIPES = 512; private static final byte[] FIRST_KEY = new byte[]{}; private static final byte[] NO_DATA = new byte[0]; private static final ReadOptions EMPTY_READ_OPTIONS = new ReadOptions(); @@ -389,6 +389,10 @@ public class LLLocalDictionary implements LLDictionary { .publishOn(dbScheduler) .concatWith(Mono.fromCallable(() -> { var locks = itemsLock.bulkGetAt(getLockIndicesEntries(entriesWindow)); + int i = 0; + for (StampedLock lock : locks) { + i++; + } ArrayList stamps = new ArrayList<>(); for (var lock : locks) { stamps.add(lock.writeLockInterruptibly());