ptupitsyn commented on code in PR #10123:
URL: https://github.com/apache/ignite/pull/10123#discussion_r910634837
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/service/IgniteServiceProcessor.java:
##########
@@ -1858,6 +1862,9 @@ private void
processDynamicCacheChangeRequest(DynamicCacheChangeBatch msg) {
depActions.servicesToUndeploy(toUndeploy);
msg.servicesDeploymentActions(depActions);
+
+ // Remove the names from the service-by-name map as well
Review Comment:
I don't think this is correct. We should only update
`registeredServicesByName` right where `registeredServices` is updated, so they
are always in sync.
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/service/IgniteServiceProcessor.java:
##########
@@ -168,6 +168,7 @@ public class IgniteServiceProcessor extends
GridProcessorAdapter implements Igni
* @see ServiceDeploymentManager
*/
private final ConcurrentMap<IgniteUuid, ServiceInfo> registeredServices =
new ConcurrentHashMap<>();
+ private final ConcurrentMap<String, ServiceInfo> registeredServicesByName
= new ConcurrentHashMap<>();
Review Comment:
Missing javadoc (build will fail).
Let's mention that this map simply improves lookup by name and should be
always in sync with the one above.
--
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]