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/04/28 17:02:53 UTC

[GitHub] [ignite] xtern commented on a change in pull request #7720: IGNITE-12898 Fix incorrect collecting cache configuration (missing CacheConfigurationEnrichment) on coordinator.

xtern commented on a change in pull request #7720:
URL: https://github.com/apache/ignite/pull/7720#discussion_r416777266



##########
File path: modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheConfigurationSplitterImpl.java
##########
@@ -41,11 +44,32 @@
     /** Marshaller. */
     private final Marshaller marshaller;
 
+    /** Grid kernal context. */
+    private final GridKernalContext ctx;
+
     /**
      * @param marshaller Marshaller.
+     * @param ctx Grid kernal context.
      */
-    public CacheConfigurationSplitterImpl(Marshaller marshaller) {
+    public CacheConfigurationSplitterImpl(Marshaller marshaller, GridKernalContext ctx) {
         this.marshaller = marshaller;

Review comment:
       let's add assertions for arguments
   assert marshaller != null;
   assert ctx != null;

##########
File path: modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheConfigurationSplitterImpl.java
##########
@@ -115,4 +139,13 @@ public CacheConfigurationSplitterImpl(Marshaller marshaller) {
             throw new IgniteException("Failed to serialize field [fieldName=" + fieldName + ", value=" + val + ']', e);
         }
     }
+
+    /**
+     * @param cfg Cache configuration.
+     * @return {@code true} If local node is affinity node for cache.
+     */
+    private boolean isAffinity(CacheConfiguration cfg) {

Review comment:
       Let's change to CacheConfiguration<?, ?> to prevent "unchecked" warning.




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