xtern commented on code in PR #10145:
URL: https://github.com/apache/ignite/pull/10145#discussion_r922234623
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/service/LazyServiceConfiguration.java:
##########
@@ -143,7 +142,7 @@ public byte[] interceptorBytes() {
if (name != null ? !name.equals(that.getName()) : that.getName() !=
null)
return false;
- if (!F.eq(srvcClsName, that.srvcClsName))
+ if (!Arrays.equals(srvcBytes, that.srvcBytes))
Review Comment:
For example we have deployed a service with the name Service and the class
Service.class.
If the user calls deploy again with the same service name, we compare the
current service configuration with the deployed one.
If it matches, we do nothing and logging that the service has already been
deployed.
If it does not match, we throwing an exception display to the user that it
does not match.
Comparing the class name in this case is not entirely correct - because we
can deploy a service with the same class name, but with a different state
(let's say the service has a serializable flag that regulates its behavior).
In addition, for a .NET service, we will always have the same class name.
The test TestServiceCallInterceptorDeploy shows the issue that is fixed by
this change (changing interceptor configuration and trying to deploy service
with the same name).
--
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]