Skip to content

IGNITE-28013 Fix stale leaseholder ID handling in LeaseUpdater and lease batch serialization#7769

Open
Lalant wants to merge 1 commit intoapache:mainfrom
Lalant:IGNITE-28013-lease-must-not-be-prolonged-for-outdated-node
Open

IGNITE-28013 Fix stale leaseholder ID handling in LeaseUpdater and lease batch serialization#7769
Lalant wants to merge 1 commit intoapache:mainfrom
Lalant:IGNITE-28013-lease-must-not-be-prolonged-for-outdated-node

Conversation

@Lalant
Copy link
Contributor

@Lalant Lalant commented Mar 12, 2026

@Lalant Lalant force-pushed the IGNITE-28013-lease-must-not-be-prolonged-for-outdated-node branch from c05b98d to 6941fb7 Compare March 13, 2026 06:53
Comment on lines +122 to +127
for (LogicalNode node : logicalTopologySnap0.nodes()) {
if (node.id().equals(nodeId)) {
return true;
}
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably, this method and nodeByConsistentId should be refactored

Comment on lines +498 to +515
if (hasStaleLeaseholderId) {
LOG.info("Leaseholder has left the logical topology, creating a new lease [groupId={}, lease={}, candidate={}]",
grpId, lease, candidate);

if (candidate == null) {
logGroupWithoutCandidateOnce(grpId, true, stableAssignments, pendingAssignments);
continue;
}

Lease newLease = writeNewLease(grpId, candidate, renewedLeases);

boolean force = Objects.equals(lease.getLeaseholder(), candidate.name());

toBeNegotiated.put(grpId, new LeaseAgreement(newLease, force));

continue;
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually, all you need is to exclude the outcome when tryToFindCandidateAmongAssignments returns stale candidate, that could be much more simple

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants