sanpwc commented on code in PR #5046: URL: https://github.com/apache/ignite-3/pull/5046#discussion_r1923537295
########## modules/partition-distribution/src/main/java/org/apache/ignite/internal/partitiondistribution/AssignmentsChain.java: ########## @@ -64,31 +71,70 @@ public AssignmentsChain replaceLast(Assignments newLast) { * @param newLast New last link. * @return new AssignmentsChain. */ - public AssignmentsChain addLast(Assignments newLast) { + public AssignmentsChain addLast(Assignments newLast, long configurationTerm, long configurationIndex) { assert !chain.isEmpty() : "Assignments chain is empty."; - List<Assignments> newChain = new ArrayList<>(chain); + List<AssignmentsLink> newChain = new ArrayList<>(chain); - newChain.add(newLast); + newChain.add(new AssignmentsLink(newLast, configurationTerm, configurationIndex)); return new AssignmentsChain(newChain); } + + /** + * Gets the next link in the chain after the given link. + * + * @param link The link to get the next one from. + * @return The next link in the chain, or {@code null} if the given link is the last one in the chain. + */ + public @Nullable AssignmentsLink nextLink(AssignmentsLink link) { Review Comment: Agreed to revert it to initial one. -- 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