Skip to content

Commit

Permalink
fix: (mod-service)Use concurrent read cache (#10965)
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Tinker <[email protected]>
Co-authored-by: Michael Tinker <[email protected]>
  • Loading branch information
Neeharika-Sompalli and tinker-michaelj authored Jan 14, 2024
1 parent cca3e1c commit 284dd7b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public abstract class ReadableKVStateBase<K, V> implements ReadableKVState<K, V>
* changed before we got to handle transaction. If the value is "null", this means it was NOT
* FOUND when we looked it up.
*/
private final Map<K, V> readCache = new HashMap<>();
private final Map<K, V> readCache = Collections.synchronizedMap(new HashMap<>());

private final Set<K> unmodifiableReadKeys = Collections.unmodifiableSet(readCache.keySet());

Expand Down

0 comments on commit 284dd7b

Please sign in to comment.