IGNITE-28013 Fix stale leaseholder ID handling in LeaseUpdater and lease batch serialization#7769
Open
Lalant wants to merge 1 commit intoapache:mainfrom
Conversation
…ase batch serialization
c05b98d to
6941fb7
Compare
denis-chudov
suggested changes
Mar 14, 2026
Comment on lines
+122
to
+127
| for (LogicalNode node : logicalTopologySnap0.nodes()) { | ||
| if (node.id().equals(nodeId)) { | ||
| return true; | ||
| } | ||
| } | ||
|
|
Contributor
There was a problem hiding this comment.
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; | ||
| } | ||
|
|
Contributor
There was a problem hiding this comment.
actually, all you need is to exclude the outcome when tryToFindCandidateAmongAssignments returns stale candidate, that could be much more simple
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://issues.apache.org/jira/browse/IGNITE-28013