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 2020/12/02 12:17:38 UTC

[GitHub] [ignite] daradurvs commented on a change in pull request #8431: IGNITE-13633 Fix ServiceDescriptor.serviceClass failure in case of de…

daradurvs commented on a change in pull request #8431:
URL: https://github.com/apache/ignite/pull/8431#discussion_r534122908



##########
File path: modules/core/src/main/java/org/apache/ignite/internal/processors/service/ServiceInfo.java
##########
@@ -37,6 +39,9 @@
     /** */
     private static final long serialVersionUID = 0L;
 
+    /** Context. */
+    private final GridKernalContext ctx;

Review comment:
       Looks like `desc.context(ctx)` should be called here as well:
   1. https://github.com/apache/ignite/blob/1ce95c603e15aa81d665c0be5b2b89466982d0fb/modules/core/src/main/java/org/apache/ignite/internal/processors/service/IgniteServiceProcessor.java#L389
   
   2. https://github.com/apache/ignite/blob/1ce95c603e15aa81d665c0be5b2b89466982d0fb/modules/core/src/main/java/org/apache/ignite/internal/processors/service/IgniteServiceProcessor.java#L1519
   
   I'd suggest to introduce a new method:
   ```
       private void registerService(ServiceInfo desc) {
           desc.context(ctx);
           
           registeredServices.put(desc.serviceId(), desc);
       }
   ```
   It'll allow us to not miss such places in future.
   
   What do you think?




----------------------------------------------------------------
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.

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