kgusakov commented on a change in pull request #379: URL: https://github.com/apache/ignite-3/pull/379#discussion_r724780246
########## File path: modules/table/src/main/java/org/apache/ignite/internal/table/distributed/TableManager.java ########## @@ -824,4 +885,141 @@ private void dropTableLocally(String name, IgniteUuid tblId, List<List<ClusterNo private boolean isTableConfigured(String name) { return tableNamesConfigured().contains(name); } + + public void setBaseline(Set<String> nodes) { + var newAssignments = baselineMgr + .nodes().stream().filter(n -> nodes.contains(n.name())).collect(Collectors.toSet()); + + var currentBaseline = new HashSet<>(baselineMgr.nodes()); + + var unionBaseline = new HashSet<>(newAssignments); + unionBaseline.addAll(currentBaseline); + + doUpdateBaseline(unionBaseline); + + if (!newAssignments.equals(unionBaseline)) + doUpdateBaseline(newAssignments); + } + + private void doUpdateBaseline(Set<ClusterNode> clusterNodes) { + var changePeersQueue = new ArrayList<Runnable>(); + + tablesCfg.tables().change( + tbls -> { + for (int i = 0; i < tbls.size(); i++) { Review comment: Yes, added a comment to setBaseline method about this issue -- 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