JAkutenshi commented on code in PR #4707:
URL: https://github.com/apache/ignite-3/pull/4707#discussion_r1840962257
##########
modules/placement-driver/src/main/java/org/apache/ignite/internal/placementdriver/LeaseUpdater.java:
##########
@@ -443,8 +443,19 @@ private void updateLeaseBatchInternal() {
? lease.getLeaseholder()
: lease.proposedCandidate();
- ClusterNode candidate = nextLeaseHolder(assignments,
grpId, proposedLeaseholder);
+ ClusterNode candidate = nextLeaseHolder(stableAssignments,
grpId, proposedLeaseholder);
+ // if there wasn't a candidate among stable assignments
set then make attempt to select a candidate among pending set
Review Comment:
Done
##########
modules/placement-driver/src/main/java/org/apache/ignite/internal/placementdriver/LeaseUpdater.java:
##########
@@ -443,8 +443,19 @@ private void updateLeaseBatchInternal() {
? lease.getLeaseholder()
: lease.proposedCandidate();
- ClusterNode candidate = nextLeaseHolder(assignments,
grpId, proposedLeaseholder);
+ ClusterNode candidate = nextLeaseHolder(stableAssignments,
grpId, proposedLeaseholder);
+ // if there wasn't a candidate among stable assignments
set then make attempt to select a candidate among pending set
+ if (candidate == null) {
+ Map<ReplicationGroupId, TokenizedAssignments>
pendingMap = assignmentsTracker.pendingAssignments();
+
+ if (pendingMap.containsKey(grpId)) {
+ Set<Assignment> pendingAssignments =
pendingMap.get(grpId).nodes();
+ candidate = nextLeaseHolder(pendingAssignments,
grpId, proposedLeaseholder);
+ }
+ }
+
+ // if we couldn't find a candidate neither stable nor
pending assignments set, so update stats and skip iteration
Review Comment:
Done
--
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]