-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IGNITE-23213 #4755
base: main
Are you sure you want to change the base?
IGNITE-23213 #4755
Conversation
@@ -537,7 +537,7 @@ private void updateLeaseBatchInternal() { | |||
); | |||
} | |||
|
|||
if (Arrays.equals(leasesCurrent.leasesBytes(), renewedValue)) { | |||
if (renewedLeases.isEmpty() || Arrays.equals(leasesCurrent.leasesBytes(), renewedValue)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why cannot we remove all leases?
public void createAgreement(ReplicationGroupId groupId, Lease lease) { | ||
leaseToNegotiate.put(groupId, new LeaseAgreement(lease)); | ||
@Nullable | ||
public Lease createAgreement(ReplicationGroupId groupId, Lease lease) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't return boolean?
public void stopInhibit() { | ||
inhibitFuture.complete(null); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a break line here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
surprisingly, checkstyle doesn't check it
* @return A lease. | ||
* @throws InterruptedException if the wait is interrupted. | ||
*/ | ||
private Lease awaitForLease(boolean needAccepted, @Nullable Lease previousLease) throws InterruptedException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not find where previousLease
is used.
} | ||
|
||
private void waitForAcceptedLease() throws InterruptedException { | ||
assertTrue(waitForCondition(() -> { | ||
Lease lease = getLeaseFromMs(); | ||
log.info("qqq lease=" + lease); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wow
@@ -201,6 +206,8 @@ public void testAssignmentChangeOnNegotiation() throws InterruptedException { | |||
|
|||
metaStorageManager.put(stablePartAssignmentsKey(GROUP_ID), Assignments.toBytes(Set.of(forPeer(NODE_1_NAME)), assignmentsTimestamp)); | |||
|
|||
System.out.println("qwe"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Useless commetn.
https://issues.apache.org/jira/browse/IGNITE-23213