You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "JAkutenshi (via GitHub)" <gi...@apache.org> on 2024/08/26 12:36:12 UTC

[PR] IGNITE-22928 Fix testZoneReplicaListener [ignite-3]

JAkutenshi opened a new pull request, #4284:
URL: https://github.com/apache/ignite-3/pull/4284

   JIRA Ticket: [IGNITE-22928 | Fix testZoneReplicaListener](https://issues.apache.org/jira/browse/IGNITE-22928)
   
   ## 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
   - [Apache Ignite Coding Guidelines](https://cwiki.apache.org/confluence/display/IGNITE/Java+Code+Style+Guide)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IGNITE-22928 Fix testZoneReplicaListener [ignite-3]

Posted by "JAkutenshi (via GitHub)" <gi...@apache.org>.
JAkutenshi commented on code in PR #4284:
URL: https://github.com/apache/ignite-3/pull/4284#discussion_r1732596763


##########
modules/partition-replicator/src/integrationTest/java/org/apache/ignite/internal/partition/replicator/utils/TestPlacementDriver.java:
##########
@@ -81,7 +81,11 @@ public CompletableFuture<List<TokenizedAssignments>> getAssignments(
         return failedFuture(new UnsupportedOperationException("getAssignments() is not supported in FakePlacementDriver yet."));
     }
 
-    private CompletableFuture<ReplicaMeta> getPrimaryReplicaMeta() {
+    private CompletableFuture<ReplicaMeta> getPrimaryReplicaMeta(ReplicationGroupId replicationGroupId) {
+        if (replicationGroupId instanceof ZonePartitionId && ((ZonePartitionId) replicationGroupId).zoneId() == 0) {

Review Comment:
   Done~



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IGNITE-22928 Fix testZoneReplicaListener [ignite-3]

Posted by "sanpwc (via GitHub)" <gi...@apache.org>.
sanpwc merged PR #4284:
URL: https://github.com/apache/ignite-3/pull/4284


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IGNITE-22928 Fix testZoneReplicaListener [ignite-3]

Posted by "kgusakov (via GitHub)" <gi...@apache.org>.
kgusakov commented on code in PR #4284:
URL: https://github.com/apache/ignite-3/pull/4284#discussion_r1732583585


##########
modules/partition-replicator/src/integrationTest/java/org/apache/ignite/internal/partition/replicator/utils/TestPlacementDriver.java:
##########
@@ -81,7 +81,11 @@ public CompletableFuture<List<TokenizedAssignments>> getAssignments(
         return failedFuture(new UnsupportedOperationException("getAssignments() is not supported in FakePlacementDriver yet."));
     }
 
-    private CompletableFuture<ReplicaMeta> getPrimaryReplicaMeta() {
+    private CompletableFuture<ReplicaMeta> getPrimaryReplicaMeta(ReplicationGroupId replicationGroupId) {
+        if (replicationGroupId instanceof ZonePartitionId && ((ZonePartitionId) replicationGroupId).zoneId() == 0) {

Review Comment:
   Let's name this 0 as a separate DEFAULT_ZONE_ID field



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org