You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2022/01/31 13:45:47 UTC

[GitHub] [ignite] timoninmaxim commented on a change in pull request #9771: IGNITE-1600 : Deprecate direct references to local services. Fix service proxy.

timoninmaxim commented on a change in pull request #9771:
URL: https://github.com/apache/ignite/pull/9771#discussion_r795667268



##########
File path: modules/core/src/main/java/org/apache/ignite/IgniteServices.java
##########
@@ -576,13 +580,15 @@ public void deployMultiple(String name, Service svc, int totalCnt, int maxPerNod
      * @param name Service name.
      * @param <T> Service type.
      * @return all deployed services with specified name.
+     * @see ServiceConfiguration#setStatisticsEnabled(boolean)
+     * @deprecated Use the proxies like {@link #serviceProxy(String, Class, boolean)}. References to local services
+     * corrupt the service statistics and bring no real performance optimization.
      */
+    @Deprecated
     public <T> Collection<T> services(String name);
 
     /**
-     * Gets a remote handle on the service. If service is available locally,
-     * then local instance is returned, otherwise, a remote proxy is dynamically
-     * created and provided for the specified service.
+     * Gets a handle on the service.

Review comment:
       Let's keep a mention about remote services and proxy creation. 
   
   For example, "Gets a handle on the remote or local service. Proxy is dynamically created and provided for the specified service".

##########
File path: modules/core/src/main/java/org/apache/ignite/internal/processors/service/IgniteServiceProcessor.java
##########
@@ -1061,23 +1061,6 @@ public ServiceContextImpl serviceContext(String name) {
     ) throws IgniteException {
         ctx.security().authorize(name, SecurityPermission.SERVICE_INVOKE);
 
-        if (hasLocalNode(prj)) {

Review comment:
       Now `IgniteServiceProcessor#hasLocalNode()` is obsolete and can be safely removed.




-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org