From 35dad2ae913623fdd97b451760817cfce41b89ed Mon Sep 17 00:00:00 2001 From: Lev Povolotsky Date: Tue, 23 Jan 2024 14:05:37 -0500 Subject: [PATCH] fix: use concurrent hashmap instead of synchroniztion for recordcache Signed-off-by: Lev Povolotsky --- .../com/hedera/node/app/spi/state/ReadableKVStateBase.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hedera-node/hedera-app-spi/src/main/java/com/hedera/node/app/spi/state/ReadableKVStateBase.java b/hedera-node/hedera-app-spi/src/main/java/com/hedera/node/app/spi/state/ReadableKVStateBase.java index ceba880c8b4c..023d8a145a43 100644 --- a/hedera-node/hedera-app-spi/src/main/java/com/hedera/node/app/spi/state/ReadableKVStateBase.java +++ b/hedera-node/hedera-app-spi/src/main/java/com/hedera/node/app/spi/state/ReadableKVStateBase.java @@ -140,7 +140,6 @@ protected final void markRead(@NonNull K key, @Nullable V value) { * @return Whether it has been read */ protected final boolean hasBeenRead(@NonNull K key) { - var keyExistence = readCache.get(key); - return keyExistence != null && keyExistence != marker; + return readCache.containsKey(key); } }