oscerd commented on code in PR #29479:
URL: https://github.com/apache/camel/pull/29479#discussion_r4515980575


##########
components/camel-state-store/camel-state-store/src/main/java/org/apache/camel/component/statestore/StateStoreComponent.java:
##########
@@ -110,10 +139,24 @@ KeyValueRepository getOrCreateBackend(String storeName, 
KeyValueRepository expli
                             storeName);
                 }
                 backend = new MemoryKeyValueRepository();
+                ServiceHelper.startService(backend);
+                return backend;
             }
-            ServiceHelper.startService(backend);
-            return backend;
         });
+        boolean existingNamespaced = result instanceof 
NamespacedKeyValueRepository;
+        if (existingNamespaced != namespaced && !(result instanceof 
MemoryKeyValueRepository && backendFactory == null)) {
+            LOG.warn("Store '{}' was already initialized with namespaced={}. 
Ignoring namespaced={} for this endpoint.",

Review Comment:
   Applied the suggested guard check (`backendFactory == null && !(result 
instanceof MemoryKeyValueRepository)`) to prevent spurious warnings on 
factory-created dedicated backends. Thanks!
   
   _Antigravity on behalf of oscerd_



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to