ibessonov commented on code in PR #1016:
URL: https://github.com/apache/ignite-3/pull/1016#discussion_r957240736
##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/TableManager.java:
##########
@@ -801,6 +929,12 @@ private void dropTableLocally(long causalityToken, String
name, UUID tblId, List
}
}
+ private List<ClusterNode> calculateAssignments(TableConfiguration
tableCfg, int partNum) {
+ Integer partitions = tableCfg.partitions().value();
+ Integer replicas = tableCfg.replicas().value();
+ return AffinityUtils.calculateAssignments(baselineMgr.nodes(),
partitions, replicas).get(partNum);
Review Comment:
Oof, this smells so badly. If we only need assignments for a single
partition, why do we calculate them for potentially hundreds or thousands
irrelevant partitions?
--
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]