Skip to content

Conversation

@nva
Copy link
Contributor

@nva nva commented Nov 27, 2025

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

@nva nva marked this pull request as ready for review December 1, 2025 13:28
@nva nva requested review from isapego and ptupitsyn as code owners December 1, 2025 13:28
@ptupitsyn ptupitsyn changed the title IGNITE-27012 Partition API improvements. IGNITE-27012 Improve partition API Dec 1, 2025
@nva nva requested a review from ptupitsyn December 2, 2025 03:55
@nva
Copy link
Contributor Author

nva commented Dec 2, 2025

@ptupitsyn Should we change the type for the partition ID from int to long? I see changes in #7111, but how it will work for PartitionDistribution#partitions, PartitionDistribution#primaryReplicas() if it uses HashMap, ArrayList with size int.

@ptupitsyn
Copy link
Contributor

@nva yes, partition id should be long.

if it uses HashMap, ArrayList with size int

We don't expect a huge number of partitions so this should not be a problem.
The idea with long is some future-proofing if we decide to introduce other types of partitions, such as range partitions.

</option>
</AndroidXmlCodeStyleSettings>
<JSCodeStyleSettings>
<JSCodeStyleSettings version="0">
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we revert those entire file? Not sure what those changes mean.

Map<Partition, ClusterNode> primaryReplicas();

/**
* Gets all partitions hosted by the specified node as a primary replica.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* Gets all partitions hosted by the specified node as a primary replica.
* Gets all partitions hosted by the specified node as a primary replica as of the time of the call.
*
* <p>Note: This assignment may become outdated if a re-assigment happens on the cluster.

return partitionId;
}

@Deprecated(since = "3.2", forRemoval = true)
Copy link
Contributor

Choose a reason for hiding this comment

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

This class is not in the public API so we can just remove the old thing.

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