diff --git a/src/main/java/it/cavallium/dbengine/database/LLDelta.java b/src/main/java/it/cavallium/dbengine/database/LLDelta.java index 8052c56..458616b 100644 --- a/src/main/java/it/cavallium/dbengine/database/LLDelta.java +++ b/src/main/java/it/cavallium/dbengine/database/LLDelta.java @@ -30,6 +30,7 @@ public class LLDelta extends LiveResourceSupport { } public static LLDelta of(Send min, Send max) { + assert (min == null && max == null) || (min != max); return new LLDelta(min, max, d -> {}); } @@ -80,17 +81,16 @@ public class LLDelta extends LiveResourceSupport { @Override public String toString() { return new StringJoiner(", ", LLDelta.class.getSimpleName() + "[", "]") - .add("min=" + LLUtils.toString(previous)) - .add("max=" + LLUtils.toString(current)) + .add("min=" + LLUtils.toStringSafe(previous)) + .add("max=" + LLUtils.toStringSafe(current)) .toString(); } public LLDelta copy() { ensureOwned(); - return new LLDelta(previous != null ? previous.copy().send() : null, - current != null ? current.copy().send() : null, - d -> {} - ); + var prevCopy = previous != null ? previous.copy().send() : null; + Send curCopy = current != null ? current.copy().send() : null; + return new LLDelta(prevCopy, curCopy, d -> {}); } @Override @@ -100,10 +100,8 @@ public class LLDelta extends LiveResourceSupport { @Override protected Owned prepareSend() { - Send minSend; - Send maxSend; - minSend = this.previous != null ? this.previous.send() : null; - maxSend = this.current != null ? this.current.send() : null; + Send minSend = this.previous != null ? this.previous.send() : null; + Send maxSend = this.current != null ? this.current.send() : null; return drop -> new LLDelta(minSend, maxSend, drop); } @@ -112,17 +110,17 @@ public class LLDelta extends LiveResourceSupport { private final Drop delegate; public CloseOnDrop(Drop drop) { - this.delegate = drop; + if (drop instanceof CloseOnDrop closeOnDrop) { + this.delegate = closeOnDrop.delegate; + } else { + this.delegate = drop; + } } @Override public void drop(LLDelta obj) { - if (obj.previous != null && obj.previous.isAccessible()) { - obj.previous.close(); - } - if (obj.current != null && obj.current.isAccessible()) { - obj.current.close(); - } + if (obj.previous != null) obj.previous.close(); + if (obj.current != null) obj.current.close(); delegate.drop(obj); } } diff --git a/src/main/java/it/cavallium/dbengine/database/LLEntry.java b/src/main/java/it/cavallium/dbengine/database/LLEntry.java index 3413008..5b9a462 100644 --- a/src/main/java/it/cavallium/dbengine/database/LLEntry.java +++ b/src/main/java/it/cavallium/dbengine/database/LLEntry.java @@ -115,17 +115,17 @@ public class LLEntry extends LiveResourceSupport { private final Drop delegate; public CloseOnDrop(Drop drop) { - this.delegate = drop; + if (drop instanceof CloseOnDrop closeOnDrop) { + this.delegate = closeOnDrop.delegate; + } else { + this.delegate = drop; + } } @Override public void drop(LLEntry obj) { - if (obj.key.isAccessible()) { - obj.key.close(); - } - if (obj.value.isAccessible()) { - obj.value.close(); - } + obj.key.close(); + obj.value.close(); delegate.drop(obj); } } diff --git a/src/main/java/it/cavallium/dbengine/database/LLRange.java b/src/main/java/it/cavallium/dbengine/database/LLRange.java index 664c249..6602b59 100644 --- a/src/main/java/it/cavallium/dbengine/database/LLRange.java +++ b/src/main/java/it/cavallium/dbengine/database/LLRange.java @@ -8,6 +8,7 @@ import io.net5.buffer.api.Owned; import io.net5.buffer.api.Send; import io.net5.buffer.api.internal.ResourceSupport; import java.util.StringJoiner; +import org.jetbrains.annotations.Nullable; /** * Range of data, from min (inclusive),to max (exclusive) @@ -15,8 +16,11 @@ import java.util.StringJoiner; public class LLRange extends LiveResourceSupport { private static final LLRange RANGE_ALL = new LLRange(null, null, null, d -> {}); + @Nullable private Buffer min; + @Nullable private Buffer max; + @Nullable private Buffer single; private LLRange(Send min, Send max, Send single, Drop drop) { @@ -207,14 +211,18 @@ public class LLRange extends LiveResourceSupport { private final Drop delegate; public CloseOnDrop(Drop drop) { - this.delegate = drop; + if (drop instanceof CloseOnDrop closeOnDrop) { + this.delegate = closeOnDrop.delegate; + } else { + this.delegate = drop; + } } @Override public void drop(LLRange obj) { - if (obj.min != null && obj.min.isAccessible()) obj.min.close(); - if (obj.max != null && obj.max.isAccessible()) obj.max.close(); - if (obj.single != null && obj.single.isAccessible()) obj.single.close(); + if (obj.min != null) obj.min.close(); + if (obj.max != null) obj.max.close(); + if (obj.single != null) obj.single.close(); delegate.drop(obj); } } diff --git a/src/main/java/it/cavallium/dbengine/database/collections/DatabaseMapDictionaryDeep.java b/src/main/java/it/cavallium/dbengine/database/collections/DatabaseMapDictionaryDeep.java index b62afdc..1642944 100644 --- a/src/main/java/it/cavallium/dbengine/database/collections/DatabaseMapDictionaryDeep.java +++ b/src/main/java/it/cavallium/dbengine/database/collections/DatabaseMapDictionaryDeep.java @@ -12,6 +12,7 @@ import it.cavallium.dbengine.client.BadBlock; import it.cavallium.dbengine.client.CompositeSnapshot; import it.cavallium.dbengine.database.LLDictionary; import it.cavallium.dbengine.database.LLDictionaryResultType; +import it.cavallium.dbengine.database.LLEntry; import it.cavallium.dbengine.database.LLRange; import it.cavallium.dbengine.database.LLSnapshot; import it.cavallium.dbengine.database.LLUtils; @@ -427,23 +428,23 @@ public class DatabaseMapDictionaryDeep> extend this.range = null; } - private static class CloseOnDrop> implements - Drop> { + private static class CloseOnDrop> + implements Drop> { private final Drop> delegate; public CloseOnDrop(Drop> drop) { - this.delegate = drop; + if (drop instanceof CloseOnDrop closeOnDrop) { + this.delegate = closeOnDrop.delegate; + } else { + this.delegate = drop; + } } @Override public void drop(DatabaseMapDictionaryDeep obj) { - if (obj.range != null) { - obj.range.close(); - } - if (obj.keyPrefix != null) { - obj.keyPrefix.close(); - } + obj.range.close(); + obj.keyPrefix.close(); delegate.drop(obj); } } diff --git a/src/main/java/it/cavallium/dbengine/database/collections/DatabaseMapDictionaryHashed.java b/src/main/java/it/cavallium/dbengine/database/collections/DatabaseMapDictionaryHashed.java index daec688..a6b6919 100644 --- a/src/main/java/it/cavallium/dbengine/database/collections/DatabaseMapDictionaryHashed.java +++ b/src/main/java/it/cavallium/dbengine/database/collections/DatabaseMapDictionaryHashed.java @@ -8,6 +8,7 @@ import io.net5.buffer.api.Send; import it.cavallium.dbengine.client.BadBlock; import it.cavallium.dbengine.client.CompositeSnapshot; import it.cavallium.dbengine.database.LLDictionary; +import it.cavallium.dbengine.database.LLEntry; import it.cavallium.dbengine.database.LLUtils; import it.cavallium.dbengine.database.LiveResourceSupport; import it.cavallium.dbengine.database.UpdateMode; @@ -327,14 +328,16 @@ public class DatabaseMapDictionaryHashed extends private final Drop> delegate; public CloseOnDrop(Drop> drop) { - this.delegate = drop; + if (drop instanceof CloseOnDrop closeOnDrop) { + this.delegate = closeOnDrop.delegate; + } else { + this.delegate = drop; + } } @Override public void drop(DatabaseMapDictionaryHashed obj) { - if (obj.subDictionary != null) { - obj.subDictionary.close(); - } + obj.subDictionary.close(); delegate.drop(obj); } } diff --git a/src/main/java/it/cavallium/dbengine/database/collections/DatabaseSingle.java b/src/main/java/it/cavallium/dbengine/database/collections/DatabaseSingle.java index 05b9f6e..9a00456 100644 --- a/src/main/java/it/cavallium/dbengine/database/collections/DatabaseSingle.java +++ b/src/main/java/it/cavallium/dbengine/database/collections/DatabaseSingle.java @@ -10,6 +10,7 @@ import it.cavallium.dbengine.client.CompositeSnapshot; import it.cavallium.dbengine.database.Delta; import it.cavallium.dbengine.database.LLDictionary; import it.cavallium.dbengine.database.LLDictionaryResultType; +import it.cavallium.dbengine.database.LLEntry; import it.cavallium.dbengine.database.LLRange; import it.cavallium.dbengine.database.LLSnapshot; import it.cavallium.dbengine.database.LLUtils; @@ -156,14 +157,16 @@ public class DatabaseSingle extends ResourceSupport, Databas private final Drop> delegate; public CloseOnDrop(Drop> drop) { - this.delegate = drop; + if (drop instanceof CloseOnDrop closeOnDrop) { + this.delegate = closeOnDrop.delegate; + } else { + this.delegate = drop; + } } @Override public void drop(DatabaseSingle obj) { - if (obj.key != null) { - obj.key.close(); - } + obj.key.close(); delegate.drop(obj); } } diff --git a/src/main/java/it/cavallium/dbengine/database/collections/DatabaseSingleBucket.java b/src/main/java/it/cavallium/dbengine/database/collections/DatabaseSingleBucket.java index b3e577f..03a67d4 100644 --- a/src/main/java/it/cavallium/dbengine/database/collections/DatabaseSingleBucket.java +++ b/src/main/java/it/cavallium/dbengine/database/collections/DatabaseSingleBucket.java @@ -7,6 +7,7 @@ import it.cavallium.dbengine.client.BadBlock; import it.cavallium.dbengine.client.CompositeSnapshot; import it.cavallium.dbengine.database.Column; import it.cavallium.dbengine.database.Delta; +import it.cavallium.dbengine.database.LLEntry; import it.cavallium.dbengine.database.LLUtils; import it.cavallium.dbengine.database.LiveResourceSupport; import it.cavallium.dbengine.database.UpdateReturnMode; @@ -223,14 +224,16 @@ public class DatabaseSingleBucket private final Drop> delegate; public CloseOnDrop(Drop> drop) { - this.delegate = drop; + if (drop instanceof CloseOnDrop closeOnDrop) { + this.delegate = closeOnDrop.delegate; + } else { + this.delegate = drop; + } } @Override public void drop(DatabaseSingleBucket obj) { - if (obj.bucketStage != null) { - obj.bucketStage.close(); - } + obj.bucketStage.close(); delegate.drop(obj); } } diff --git a/src/main/java/it/cavallium/dbengine/database/collections/DatabaseSingleMapped.java b/src/main/java/it/cavallium/dbengine/database/collections/DatabaseSingleMapped.java index 935c0e4..9b15b52 100644 --- a/src/main/java/it/cavallium/dbengine/database/collections/DatabaseSingleMapped.java +++ b/src/main/java/it/cavallium/dbengine/database/collections/DatabaseSingleMapped.java @@ -8,6 +8,7 @@ import it.cavallium.dbengine.client.BadBlock; import it.cavallium.dbengine.client.CompositeSnapshot; import it.cavallium.dbengine.client.Mapper; import it.cavallium.dbengine.database.Delta; +import it.cavallium.dbengine.database.LLEntry; import it.cavallium.dbengine.database.LLUtils; import it.cavallium.dbengine.database.UpdateReturnMode; import it.cavallium.dbengine.database.serialization.SerializationException; @@ -174,14 +175,16 @@ public class DatabaseSingleMapped extends ResourceSupport private final Drop> delegate; public CloseOnDrop(Drop> drop) { - this.delegate = drop; + if (drop instanceof CloseOnDrop closeOnDrop) { + this.delegate = closeOnDrop.delegate; + } else { + this.delegate = drop; + } } @Override public void drop(DatabaseSingleMapped obj) { - if (obj.serializedSingle != null) { - obj.serializedSingle.close(); - } + obj.serializedSingle.close(); delegate.drop(obj); } } diff --git a/src/main/java/it/cavallium/dbengine/database/disk/LLIndexSearchers.java b/src/main/java/it/cavallium/dbengine/database/disk/LLIndexSearchers.java index a6a0411..2cb8de9 100644 --- a/src/main/java/it/cavallium/dbengine/database/disk/LLIndexSearchers.java +++ b/src/main/java/it/cavallium/dbengine/database/disk/LLIndexSearchers.java @@ -5,6 +5,7 @@ import io.net5.buffer.api.Owned; import io.net5.buffer.api.Resource; import io.net5.buffer.api.Send; import io.net5.buffer.api.internal.ResourceSupport; +import it.cavallium.dbengine.database.LLEntry; import it.cavallium.dbengine.database.LiveResourceSupport; import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap; import java.io.IOException; @@ -93,12 +94,16 @@ public interface LLIndexSearchers extends Resource { private final Drop delegate; public CloseOnDrop(Drop drop) { - this.delegate = drop; + if (drop instanceof CloseOnDrop closeOnDrop) { + this.delegate = closeOnDrop.delegate; + } else { + this.delegate = drop; + } } @Override public void drop(UnshardedIndexSearchers obj) { - if (obj.indexSearcher != null) obj.indexSearcher.close(); + obj.indexSearcher.close(); delegate.drop(obj); } } @@ -182,24 +187,21 @@ public interface LLIndexSearchers extends Resource { private static class CloseOnDrop implements Drop { - private volatile boolean dropped = false; private final Drop delegate; public CloseOnDrop(Drop drop) { - this.delegate = drop; + if (drop instanceof CloseOnDrop closeOnDrop) { + this.delegate = closeOnDrop.delegate; + } else { + this.delegate = drop; + } } @Override public void drop(ShardedIndexSearchers obj) { - assert !dropped; - if (obj.indexSearchers != null) { - for (LLIndexSearcher indexSearcher : obj.indexSearchers) { - if (indexSearcher.isAccessible()) { - indexSearcher.close(); - } - } + for (LLIndexSearcher indexSearcher : obj.indexSearchers) { + indexSearcher.close(); } - dropped = true; delegate.drop(obj); } } 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 075fa91..104f00c 100644 --- a/src/main/java/it/cavallium/dbengine/database/disk/LLLocalDictionary.java +++ b/src/main/java/it/cavallium/dbengine/database/disk/LLLocalDictionary.java @@ -930,6 +930,10 @@ public class LLLocalDictionary implements LLDictionary { assert newData.isAccessible(); dbPut(cfh, null, key.send(), newData.copy().send()); } + if (newData == prevData && newData != null) { + newData = newData.copy(); + } + assert (prevData == null && newData == null) || newData != prevData; return LLDelta.of( prevData != null ? prevData.send() : null, newData != null ? newData.send() : null diff --git a/src/main/java/it/cavallium/dbengine/netty/NullableBuffer.java b/src/main/java/it/cavallium/dbengine/netty/NullableBuffer.java index 038f65e..6b90063 100644 --- a/src/main/java/it/cavallium/dbengine/netty/NullableBuffer.java +++ b/src/main/java/it/cavallium/dbengine/netty/NullableBuffer.java @@ -7,6 +7,7 @@ import io.net5.buffer.api.Send; import io.net5.buffer.api.internal.ResourceSupport; import it.cavallium.dbengine.client.SearchResult; import it.cavallium.dbengine.database.LiveResourceSupport; +import it.cavallium.dbengine.database.collections.DatabaseSingle; import org.jetbrains.annotations.Nullable; public class NullableBuffer extends LiveResourceSupport { @@ -54,16 +55,16 @@ public class NullableBuffer extends LiveResourceSupport delegate; public CloseOnDrop(Drop drop) { - this.delegate = drop; + if (drop instanceof CloseOnDrop closeOnDrop) { + this.delegate = closeOnDrop.delegate; + } else { + this.delegate = drop; + } } @Override public void drop(NullableBuffer obj) { - if (obj.buffer != null) { - if (obj.buffer.isAccessible()) { - obj.buffer.close(); - } - } + if (obj.buffer != null) obj.buffer.close(); delegate.drop(obj); } } diff --git a/src/test/java/it/cavallium/dbengine/TestDictionaryMapDeep.java b/src/test/java/it/cavallium/dbengine/TestDictionaryMapDeep.java index dd79298..8a29604 100644 --- a/src/test/java/it/cavallium/dbengine/TestDictionaryMapDeep.java +++ b/src/test/java/it/cavallium/dbengine/TestDictionaryMapDeep.java @@ -229,9 +229,7 @@ public abstract class TestDictionaryMapDeep { @ParameterizedTest @MethodSource("provideArgumentsSet") - public void testSetValueGetAllValues(UpdateMode updateMode, - String key, - Map value, + public void testSetValueGetAllValues(UpdateMode updateMode, String key, Map value, boolean shouldFail) { var stpVer = StepVerifier .create(tempDb(getTempDbGenerator(), allocator, db -> tempDictionary(db, updateMode) @@ -252,7 +250,8 @@ public abstract class TestDictionaryMapDeep { @ParameterizedTest @MethodSource("provideArgumentsSet") - public void testAtSetGetAllStagesGetAllValues(UpdateMode updateMode, String key, Map value, boolean shouldFail) { + public void testAtSetGetAllStagesGetAllValues(UpdateMode updateMode, String key, Map value, + boolean shouldFail) { var remainingEntries = new ConcurrentHashMap, Boolean>().keySet(true); Step> stpVer = StepVerifier .create(tempDb(getTempDbGenerator(), allocator, db -> tempDictionary(db, updateMode) @@ -302,13 +301,24 @@ public abstract class TestDictionaryMapDeep { @ParameterizedTest @MethodSource({"provideArgumentsPut"}) - public void testAtPutValueAtGetValue(UpdateMode updateMode, String key1, String key2, String value, boolean shouldFail) { + public void testAtPutValueAtGetValue(UpdateMode updateMode, String key1, String key2, String value, + boolean shouldFail) { var stpVer = StepVerifier .create(tempDb(getTempDbGenerator(), allocator, db -> tempDictionary(db, updateMode) .map(dict -> tempDatabaseMapDictionaryDeepMap(dict, 5, 6)) .flatMap(map -> map - .at(null, key1).flatMap(v -> v.putValue(key2, value).doFinally(s -> v.close())) - .then(map.at(null, key1).flatMap(v -> v.getValue(null, key2).doFinally(s -> v.close()))) + .at(null, key1) + .flatMap(v -> v + .putValue(key2, value) + .doFinally(s -> v.close()) + ) + .then(map + .at(null, key1) + .flatMap(v -> v + .getValue(null, key2) + .doFinally(s -> v.close()) + ) + ) .doFinally(s -> map.close()) ) )); @@ -327,8 +337,8 @@ public abstract class TestDictionaryMapDeep { .create(tempDb(getTempDbGenerator(), allocator, db -> tempDictionary(db, updateMode) .map(dict -> tempDatabaseMapDictionaryDeepMap(dict, 5, 6)) .flatMapMany(map -> Flux - .concat( - map + .concat + (map .putValueAndGetPrevious(key, Map.of("error?", "error.")) .defaultIfEmpty(Map.of("nothing", "nothing")), map.putValueAndGetPrevious(key, value), @@ -347,7 +357,8 @@ public abstract class TestDictionaryMapDeep { @ParameterizedTest @MethodSource("provideArgumentsPut") - public void testAtPutValueAndGetPrevious(UpdateMode updateMode, String key1, String key2, String value, boolean shouldFail) { + public void testAtPutValueAndGetPrevious(UpdateMode updateMode, String key1, String key2, String value, + boolean shouldFail) { var stpVer = StepVerifier .create(tempDb(getTempDbGenerator(), allocator, db -> tempDictionary(db, updateMode) .map(dict -> tempDatabaseMapDictionaryDeepMap(dict, 5, 6)) @@ -385,7 +396,8 @@ public abstract class TestDictionaryMapDeep { @ParameterizedTest @MethodSource("provideArgumentsSet") - public void testSetValueRemoveAndGetPrevious(UpdateMode updateMode, String key, Map value, boolean shouldFail) { + public void testSetValueRemoveAndGetPrevious(UpdateMode updateMode, String key, Map value, + boolean shouldFail) { var stpVer = StepVerifier .create(tempDb(getTempDbGenerator(), allocator, db -> tempDictionary(db, updateMode) .map(dict -> tempDatabaseMapDictionaryDeepMap(dict, 5, 6)) @@ -408,7 +420,8 @@ public abstract class TestDictionaryMapDeep { @ParameterizedTest @MethodSource("provideArgumentsPut") - public void testAtPutValueRemoveAndGetPrevious(UpdateMode updateMode, String key1, String key2, String value, boolean shouldFail) { + public void testAtPutValueRemoveAndGetPrevious(UpdateMode updateMode, String key1, String key2, String value, + boolean shouldFail) { var stpVer = StepVerifier .create(tempDb(getTempDbGenerator(), allocator, db -> tempDictionary(db, updateMode) .map(dict -> tempDatabaseMapDictionaryDeepMap(dict, 5, 6)) @@ -447,7 +460,8 @@ public abstract class TestDictionaryMapDeep { @ParameterizedTest @MethodSource("provideArgumentsSet") - public void testSetValueRemoveAndGetStatus(UpdateMode updateMode, String key, Map value, boolean shouldFail) { + public void testSetValueRemoveAndGetStatus(UpdateMode updateMode, String key, Map value, + boolean shouldFail) { var stpVer = StepVerifier .create(tempDb(getTempDbGenerator(), allocator, db -> tempDictionary(db, updateMode) .map(dict -> tempDatabaseMapDictionaryDeepMap(dict, 5, 6)) @@ -470,7 +484,8 @@ public abstract class TestDictionaryMapDeep { @ParameterizedTest @MethodSource("provideArgumentsPut") - public void testAtPutValueRemoveAndGetStatus(UpdateMode updateMode, String key1, String key2, String value, boolean shouldFail) { + public void testAtPutValueRemoveAndGetStatus(UpdateMode updateMode, String key1, String key2, String value, + boolean shouldFail) { var stpVer = StepVerifier .create(tempDb(getTempDbGenerator(), allocator, db -> tempDictionary(db, updateMode) .map(dict -> tempDatabaseMapDictionaryDeepMap(dict, 5, 6)) @@ -630,7 +645,9 @@ public abstract class TestDictionaryMapDeep { if (updateMode != UpdateMode.ALLOW_UNSAFE || shouldFail) { stpVer.verifyError(); } else { - stpVer.expectNext(Map.of("error?", "error."), Map.of("error?", "error."), Map.of("error?", "error."), value, value).verifyComplete(); + stpVer + .expectNext(Map.of("error?", "error."), Map.of("error?", "error."), Map.of("error?", "error."), value, value) + .verifyComplete(); } } @@ -747,7 +764,8 @@ public abstract class TestDictionaryMapDeep { @ParameterizedTest @MethodSource("provideArgumentsSetMulti") - public void testSetMultiGetMulti(UpdateMode updateMode, Map> entries, boolean shouldFail) { + public void testSetMultiGetMulti(UpdateMode updateMode, Map> entries, + boolean shouldFail) { var remainingEntries = new ConcurrentHashMap>, Boolean>().keySet(true); Step>> stpVer = StepVerifier .create(tempDb(getTempDbGenerator(), allocator, db -> tempDictionary(db, updateMode) @@ -777,7 +795,8 @@ public abstract class TestDictionaryMapDeep { @ParameterizedTest @MethodSource("provideArgumentsSetMulti") - public void testSetAllValuesGetMulti(UpdateMode updateMode, Map> entries, boolean shouldFail) { + public void testSetAllValuesGetMulti(UpdateMode updateMode, Map> entries, + boolean shouldFail) { var remainingEntries = new ConcurrentHashMap>, Boolean>().keySet(true); Step>> stpVer = StepVerifier .create(tempDb(getTempDbGenerator(), allocator, db -> tempDictionary(db, updateMode) @@ -804,7 +823,8 @@ public abstract class TestDictionaryMapDeep { @ParameterizedTest @MethodSource("provideArgumentsSetMulti") - public void testSetAllValuesAndGetPrevious(UpdateMode updateMode, Map> entries, boolean shouldFail) { + public void testSetAllValuesAndGetPrevious(UpdateMode updateMode, Map> entries, + boolean shouldFail) { var remainingEntries = new ConcurrentHashMap>, Boolean>().keySet(true); Step>> stpVer = StepVerifier .create(tempDb(getTempDbGenerator(), allocator, db -> tempDictionary(db, updateMode) @@ -862,7 +882,8 @@ public abstract class TestDictionaryMapDeep { @ParameterizedTest @MethodSource("provideArgumentsSetMulti") - public void testSetAndGetStatus(UpdateMode updateMode, Map> entries, boolean shouldFail) { + public void testSetAndGetStatus(UpdateMode updateMode, Map> entries, + boolean shouldFail) { Step stpVer = StepVerifier .create(tempDb(getTempDbGenerator(), allocator, db -> tempDictionary(db, updateMode) .map(dict -> tempDatabaseMapDictionaryDeepMap(dict, 5, 6)) @@ -894,7 +915,8 @@ public abstract class TestDictionaryMapDeep { @ParameterizedTest @MethodSource("provideArgumentsSetMulti") - public void testSetAndGetPrevious(UpdateMode updateMode, Map> entries, boolean shouldFail) { + public void testSetAndGetPrevious(UpdateMode updateMode, Map> entries, + boolean shouldFail) { var remainingEntries = new ConcurrentHashMap>, Boolean>().keySet(true); Step>> stpVer = StepVerifier .create(tempDb(getTempDbGenerator(), allocator, db -> tempDictionary(db, updateMode) @@ -923,7 +945,8 @@ public abstract class TestDictionaryMapDeep { @ParameterizedTest @MethodSource("provideArgumentsSetMulti") - public void testSetClearAndGetPreviousGet(UpdateMode updateMode, Map> entries, boolean shouldFail) { + public void testSetClearAndGetPreviousGet(UpdateMode updateMode, Map> entries, + boolean shouldFail) { var remainingEntries = new ConcurrentHashMap>, Boolean>().keySet(true); Step>> stpVer = StepVerifier .create(tempDb(getTempDbGenerator(), allocator, db -> tempDictionary(db, updateMode) @@ -950,7 +973,8 @@ public abstract class TestDictionaryMapDeep { @ParameterizedTest @MethodSource("provideArgumentsSetMulti") - public void testSetMultiGetAllValues(UpdateMode updateMode, Map> entries, boolean shouldFail) { + public void testSetMultiGetAllValues(UpdateMode updateMode, Map> entries, + boolean shouldFail) { var remainingEntries = new ConcurrentHashMap>, Boolean>().keySet(true); Step>> stpVer = StepVerifier .create(tempDb(getTempDbGenerator(), allocator, db -> tempDictionary(db, updateMode) @@ -1006,7 +1030,8 @@ public abstract class TestDictionaryMapDeep { @ParameterizedTest @MethodSource("provideArgumentsSetMulti") - public void testSetMultiGetAllStagesGet(UpdateMode updateMode, Map> entries, boolean shouldFail) { + public void testSetMultiGetAllStagesGet(UpdateMode updateMode, Map> entries, + boolean shouldFail) { var remainingEntries = new ConcurrentHashMap>, Boolean>().keySet(true); Step>> stpVer = StepVerifier .create(tempDb(getTempDbGenerator(), allocator, db -> tempDictionary(db, updateMode) @@ -1040,7 +1065,8 @@ public abstract class TestDictionaryMapDeep { @ParameterizedTest @MethodSource("provideArgumentsSetMulti") - public void testSetMultiIsEmpty(UpdateMode updateMode, Map> entries, boolean shouldFail) { + public void testSetMultiIsEmpty(UpdateMode updateMode, Map> entries, + boolean shouldFail) { Step stpVer = StepVerifier .create(tempDb(getTempDbGenerator(), allocator, db -> tempDictionary(db, updateMode) .map(dict -> tempDatabaseMapDictionaryDeepMap(dict, 5, 6))