Skip to content

IGNITE-22928 Fix testZoneReplicaListener#4284

Merged
sanpwc merged 5 commits intoapache:mainfrom
gridgain:ignite-22928
Aug 27, 2024
Merged

IGNITE-22928 Fix testZoneReplicaListener#4284
sanpwc merged 5 commits intoapache:mainfrom
gridgain:ignite-22928

Conversation

@JAkutenshi
Copy link
Copy Markdown
Contributor

JIRA Ticket: IGNITE-22928 | Fix testZoneReplicaListener

The goal

The goal is to fix the disabled test.

The reason

It fails

The solution

The main issue there is a race between switched primary replica from TestPlacementDriver and internal logic inside of lifecycle managers. The issued zone is default, so a possible solution is to return null primary (no primary) for the default zone and thus there no the race.


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

@JAkutenshi JAkutenshi marked this pull request as ready for review August 26, 2024 13:30

private CompletableFuture<ReplicaMeta> getPrimaryReplicaMeta() {
private CompletableFuture<ReplicaMeta> getPrimaryReplicaMeta(ReplicationGroupId replicationGroupId) {
if (replicationGroupId instanceof ZonePartitionId && ((ZonePartitionId) replicationGroupId).zoneId() == 0) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Let's name this 0 as a separate DEFAULT_ZONE_ID field

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done~

@JAkutenshi JAkutenshi requested a review from kgusakov August 27, 2024 14:20
@sanpwc sanpwc merged commit 8b705e0 into apache:main Aug 27, 2024
@sanpwc sanpwc deleted the ignite-22928 branch August 27, 2024 14:35
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.

3 participants