alievmirza commented on code in PR #1655:
URL: https://github.com/apache/ignite-3/pull/1655#discussion_r1104862325


##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/TableManager.java:
##########
@@ -1863,23 +1863,36 @@ public void onUpdate(WatchEvent evt) {
                         if (zoneId == tableZoneId) {
                             TableConfiguration tableCfg = 
tables.get(tableView.name());
 
+                            byte[] assignmentsBytes = 
((ExtendedTableConfiguration) tableCfg).assignments().value();
+
+                            List<Set<Assignment>> tableAssignments = 
ByteUtils.fromBytes(assignmentsBytes);
+
                             for (int part = 0; part < tableView.partitions(); 
part++) {
                                 UUID tableId = ((ExtendedTableConfiguration) 
tableCfg).id().value();
 
                                 TablePartitionId replicaGrpId = new 
TablePartitionId(tableId, part);
 
-                                int partId = part;
+                                int replicas = tableView.replicas();
 
-                                updatePendingAssignmentsKeys(
-                                        tableView.name(), replicaGrpId, 
dataNodes, tableView.replicas(),
-                                        
evt.entryEvent().newEntry().revision(), metaStorageMgr, part
-                                ).exceptionally(e -> {
-                                    LOG.error(
-                                            "Exception on updating assignments 
for [table={}, partition={}]", e, tableView.name(), partId
-                                    );
+                                Set<Assignment> partAssignments = 
AffinityUtils.calculateAssignmentForPartition(dataNodes, part, replicas);
+
+                                // TODO IGNITE-18624 This check will not be 
needed when dataNodes from distribution zone will be used

Review Comment:
   I would remove this todo, and leave this check in any cases, because, for 
example, we still can rewrite `dataNodes` with the same value, for example, 
when we start node and init data nodes from the Vauit with method 
`DistributionZoneManager#initDataNodesFromVaultManager`.



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

Reply via email to