Update LLLocalDictionary.java

This commit is contained in:
Andrea Cavalli 2021-02-13 00:45:16 +01:00
parent c796459e1c
commit 3f78e5fec9

View File

@ -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<Long> stamps = new ArrayList<>();
for (var lock : locks) {
stamps.add(lock.writeLockInterruptibly());