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-24365 Implement UpdateMinimumActiveTxBeginTimeReplicaRequest processing for zone replica #5197

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

Conversation

sk0x50
Copy link
Contributor

@sk0x50 sk0x50 commented Feb 7, 2025

https://issues.apache.org/jira/browse/IGNITE-24365

Thank you for submitting the pull request.

To streamline the review process of the patch and ensure better code quality
we ask both an author and a reviewer to verify the following:

The Review Checklist

  • Formal criteria: TC status, codestyle, mandatory documentation. Also make sure to complete the following:
    - There is a single JIRA ticket related to the pull request.
    - The web-link to the pull request is attached to the JIRA ticket.
    - The JIRA ticket has the Patch Available state.
    - The description of the JIRA ticket explains WHAT was made, WHY and HOW.
    - The pull request title is treated as the final commit message. The following pattern must be used: IGNITE-XXXX Change summary where XXXX - number of JIRA issue.
  • Design: new code conforms with the design principles of the components it is added to.
  • Patch quality: patch cannot be split into smaller pieces, its size must be reasonable.
  • Code quality: code is clean and readable, necessary developer documentation is added if needed.
  • Tests code quality: test set covers positive/negative scenarios, happy/edge cases. Tests are effective in terms of execution time and resources.

Notes


ObjectIterator<Entry> itr = tablesWithPartitions.int2IntEntrySet().iterator();
ObjectIterator<Entry> itr = idsWithPartitions.int2IntEntrySet().iterator();
Copy link
Contributor

Choose a reason for hiding this comment

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

It's ids because currently it's both table's and zone's ids depending on the feature flag, right?

Copy link
Contributor Author

@sk0x50 sk0x50 Feb 10, 2025

Choose a reason for hiding this comment

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

Yes, you are right.

@@ -38,6 +38,7 @@ class CatalogManagerCompactionFacade {
this.catalogManager = catalogManager;
}

// TODO https://issues.apache.org/jira/browse/IGNITE-22115 Remove this method.
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd rather add https://issues.apache.org/jira/browse/IGNITE-22522 instead of epic.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👌


// The timestamp must increase monotonically, otherwise it will have to be
// stored on disk so that reordering does not occur after the node is restarted.
return commandProcessor.apply(cmd);
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, I've seen this pull-request. I will adopt my changes when that one ^ is merged.

PARTITION_REPLICATION_MESSAGES_FACTORY,
clockService,
this::applyCmdWithExceptionHandling
);
}

@Override
public CompletableFuture<ReplicaResult> invoke(ReplicaRequest request, UUID senderId) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I've expected that you will copy

        return ensureReplicaIsPrimary(request)
                .thenCompose(res -> processRequest(request, res.get1(), senderId, res.get2()))
                .thenApply(res -> {
                    if (res instanceof ReplicaResult) {
                        return (ReplicaResult) res;
                    } else {
                        return new ReplicaResult(res, null);
                    }
                });

With empty ensureReplicaIsPrimary.

Anyway let's wait for #5187. There are too many clashes for now.

@sk0x50 sk0x50 marked this pull request as ready for review February 13, 2025 07:59
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