Skip to content
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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

IGNITE-23213 #4755

wants to merge 7 commits into from

Conversation

denis-chudov
Copy link
Contributor

@@ -537,7 +537,7 @@ private void updateLeaseBatchInternal() {
);
}

if (Arrays.equals(leasesCurrent.leasesBytes(), renewedValue)) {
if (renewedLeases.isEmpty() || Arrays.equals(leasesCurrent.leasesBytes(), renewedValue)) {
Copy link
Contributor

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) {
Copy link
Contributor

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);
}
}
Copy link
Contributor

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.

Copy link
Contributor Author

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 {
Copy link
Contributor

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);
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove it.

Copy link
Contributor Author

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");
Copy link
Contributor

Choose a reason for hiding this comment

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

Useless commetn.

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