Vladsz83 commented on code in PR #11758:
URL: https://github.com/apache/ignite/pull/11758#discussion_r1897963065


##########
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/metadata/ColocationGroup.java:
##########
@@ -58,6 +58,13 @@ public class ColocationGroup implements MarshalableMessage {
     @GridDirectTransient
     private List<List<UUID>> assignments;
 
+    /**
+     * Flag, indacating that assignment is formed by original cache assignment 
for given topology.
+     * In case of {@code true} value we can skip assignment marshalling and 
calc assignment on remote nodes.
+     */
+    @GridDirectTransient
+    private boolean cacheAssignment;

Review Comment:
   Not sure about `cache`. `Original`, `primary`?



##########
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/metadata/ColocationGroup.java:
##########
@@ -66,6 +73,11 @@ public static ColocationGroup forNodes(List<UUID> nodeIds) {
         return new ColocationGroup(null, nodeIds, null);
     }
 
+    /** */
+    public static ColocationGroup forCacheAssignment(List<List<UUID>> 
assignments) {

Review Comment:
   Previous method `forAssignments()` is now actual only for tests. Do we need 
it? Should we refactor to something like `forAssignments(List<List<UUID>> 
assignments, boolean original)`. `cache` is a bit unclear imho.



##########
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/metadata/ColocationGroup.java:
##########
@@ -159,6 +178,8 @@ public ColocationGroup colocate(ColocationGroup other) 
throws ColocationMappingE
                 "Replicated query parts are not co-located on all nodes");
         }
 
+        boolean cacheAssignment = this.cacheAssignment || 
other.cacheAssignment;

Review Comment:
   Seme. something like `primaryAssigment`?



-- 
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-unsubscr...@ignite.apache.org

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

Reply via email to