This is an automated email from the ASF dual-hosted git repository.

robbie pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git


The following commit(s) were added to refs/heads/main by this push:
     new c1648d5917 ARTEMIS-4406: update LocalCache persisted entry tracking to 
use a ConcurrentHashMap
c1648d5917 is described below

commit c1648d5917fc752364898aab040d3280f2c9a2f4
Author: Robbie Gemmell <[email protected]>
AuthorDate: Tue Aug 29 10:07:32 2023 +0100

    ARTEMIS-4406: update LocalCache persisted entry tracking to use a 
ConcurrentHashMap
---
 .../apache/activemq/artemis/core/server/routing/caches/LocalCache.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/routing/caches/LocalCache.java
 
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/routing/caches/LocalCache.java
index a9542253a3..1ecfaa36fb 100644
--- 
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/routing/caches/LocalCache.java
+++ 
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/routing/caches/LocalCache.java
@@ -27,6 +27,7 @@ import java.lang.invoke.MethodHandles;
 
 import java.util.Map;
 import java.util.Objects;
+import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.TimeUnit;
 
 public class LocalCache implements Cache, RemovalListener<String, String> {
@@ -70,7 +71,7 @@ public class LocalCache implements Cache, 
RemovalListener<String, String> {
    @Override
    public void start() {
       if (persisted) {
-         persistedCacheEntries = storageManager.getPersistedKeyValuePairs(id);
+         persistedCacheEntries = new 
ConcurrentHashMap<>(storageManager.getPersistedKeyValuePairs(id));
 
          if (persistedCacheEntries != null) {
             for (Map.Entry<String, PersistedKeyValuePair> cacheEntry : 
persistedCacheEntries.entrySet()) {

Reply via email to