You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2021/10/26 14:00:13 UTC

[GitHub] [ignite] anton-vinogradov opened a new pull request #9529: IGNITE-15702 Control.sh consistency check command should support status option

anton-vinogradov opened a new pull request #9529:
URL: https://github.com/apache/ignite/pull/9529


   Thank you for submitting the pull request to the Apache Ignite.
   
   In order to streamline the review of the contribution 
   we ask you to ensure the following steps have been taken:
   
   ### The Contribution Checklist
   - [ ] 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 pull request body describes changes that have been made. 
   The description explains _WHAT_ and _WHY_ was made instead of _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.
   - [ ] A reviewer has been mentioned through the JIRA comments 
   (see [the Maintainers list](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute#HowtoContribute-ReviewProcessandMaintainers)) 
   - [ ] The pull request has been checked by the Teamcity Bot and 
   the `green visa` attached to the JIRA ticket (see [TC.Bot: Check PR](https://mtcga.gridgain.com/prs.html))
   
   ### Notes
   - [How to Contribute](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute)
   - [Coding abbreviation rules](https://cwiki.apache.org/confluence/display/IGNITE/Abbreviation+Rules)
   - [Coding Guidelines](https://cwiki.apache.org/confluence/display/IGNITE/Coding+Guidelines)
   - [Apache Ignite Teamcity Bot](https://cwiki.apache.org/confluence/display/IGNITE/Apache+Ignite+Teamcity+Bot)
   
   If you need any help, please email dev@ignite.apache.org or ask anу advice on http://asf.slack.com _#ignite_ channel.
   


-- 
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



[GitHub] [ignite] timoninmaxim commented on a change in pull request #9529: IGNITE-15702 Control.sh consistency check command should support status option

Posted by GitBox <gi...@apache.org>.
timoninmaxim commented on a change in pull request #9529:
URL: https://github.com/apache/ignite/pull/9529#discussion_r744224111



##########
File path: modules/control-utility/src/test/java/org/apache/ignite/util/KillCommandsCommandShTest.java
##########
@@ -271,16 +287,25 @@ public void testCancelConsistencyTask() throws InterruptedException {
             thLatch.countDown();
         });
 
+        // GridNearGetRequest messages count required to pefrom getAll() with readRepair from all nodes twice.
+        // First will be finished (which generates status), second will be frozen.
+        int twiceGetMsgCnt = SERVER_NODE_CNT * (SERVER_NODE_CNT - 1) * 2;

Review comment:
       Looks like this test can be simplified. If the consistency status map will be notified on the repair task just started then we can wait just "0/10000" instead of "1024/10000". So, there is no need to implement complex logic for waiting specific events? WDYT?




-- 
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



[GitHub] [ignite] anton-vinogradov commented on a change in pull request #9529: IGNITE-15702 Control.sh consistency check command should support status option

Posted by GitBox <gi...@apache.org>.
anton-vinogradov commented on a change in pull request #9529:
URL: https://github.com/apache/ignite/pull/9529#discussion_r745491516



##########
File path: modules/control-utility/src/test/java/org/apache/ignite/util/KillCommandsCommandShTest.java
##########
@@ -271,16 +287,25 @@ public void testCancelConsistencyTask() throws InterruptedException {
             thLatch.countDown();
         });
 
+        // GridNearGetRequest messages count required to pefrom getAll() with readRepair from all nodes twice.
+        // First will be finished (which generates status), second will be frozen.
+        int twiceGetMsgCnt = SERVER_NODE_CNT * (SERVER_NODE_CNT - 1) * 2;

Review comment:
       0/10000 will not show real progress, just start.
   While 1024/10000 (1024 will be defined as a const later) means counter works.




-- 
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



[GitHub] [ignite] anton-vinogradov merged pull request #9529: IGNITE-15702 Control.sh consistency check command should support status option

Posted by GitBox <gi...@apache.org>.
anton-vinogradov merged pull request #9529:
URL: https://github.com/apache/ignite/pull/9529


   


-- 
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



[GitHub] [ignite] timoninmaxim commented on a change in pull request #9529: IGNITE-15702 Control.sh consistency check command should support status option

Posted by GitBox <gi...@apache.org>.
timoninmaxim commented on a change in pull request #9529:
URL: https://github.com/apache/ignite/pull/9529#discussion_r741870181



##########
File path: modules/core/src/main/java/org/apache/ignite/internal/visor/consistency/VisorConsistencyRepairTaskArg.java
##########
@@ -77,4 +78,19 @@ public String cacheName() {
     public int part() {
         return part;
     }
+
+    /** {@inheritDoc} */
+    @Override public boolean equals(Object o) {
+        if (this == o)
+            return true;
+        if (o == null || getClass() != o.getClass())

Review comment:
       Format code with Ignite guidelines (add few empty lines).

##########
File path: modules/core/src/main/java/org/apache/ignite/internal/visor/consistency/VisorConsistencyRepairTask.java
##########
@@ -198,6 +162,8 @@ protected VisorConsistencyRepairJob(VisorConsistencyRepairTaskArg arg, boolean d
 
                             log.info("Consistency check progress [grp=" + grpCtx.cacheOrGroupName() +
                                 ", part=" + p + ", checked=" + cnt + "/" + part.fullSize() + "]");
+
+                            VisorConsistencyStatusTask.MAP.put(arg, cnt + "/" + part.fullSize());

Review comment:
       Should the map also be notified a little bit earlier? See line 114 with logging "Consistency check started"? I think we should put to the map (arg, 0/part.fullSize()) in this moment, WDYT?
   
   Otherwise the status job may return that no repair jobs are found, but actually there are in progress.

##########
File path: modules/core/src/main/java/org/apache/ignite/internal/visor/consistency/VisorConsistencyStatusTask.java
##########
@@ -0,0 +1,97 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.visor.consistency;
+
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+import org.apache.ignite.IgniteException;
+import org.apache.ignite.IgniteLogger;
+import org.apache.ignite.compute.ComputeJobResult;
+import org.apache.ignite.internal.visor.VisorJob;
+import org.apache.ignite.resources.LoggerResource;
+
+/**
+ *
+ */
+public class VisorConsistencyStatusTask extends AbstractConsistencyTask<Void, String> {
+    /**
+     * Serial version uid.
+     */

Review comment:
       Too much honor for `serialVersionUID` - 3 comment lines instead of 1 as for others fields

##########
File path: modules/control-utility/src/main/java/org/apache/ignite/internal/commandline/consistency/ConsistencyCommand.java
##########
@@ -96,7 +98,7 @@
     }
 
     /** {@inheritDoc} */
-    @Override public VisorConsistencyRepairTaskArg arg() {
+    @Override public Object arg() {

Review comment:
       Looks like we don't need this change?

##########
File path: modules/control-utility/src/test/java/org/apache/ignite/util/KillCommandsCommandShTest.java
##########
@@ -271,16 +287,25 @@ public void testCancelConsistencyTask() throws InterruptedException {
             thLatch.countDown();
         });
 
+        // GridNearGetRequest messages count required to pefrom getAll() with readRepair from all nodes twice.
+        // First will be finished (which generates status), second will be frozen.
+        int twiceGetMsgCnt = SERVER_NODE_CNT * (SERVER_NODE_CNT - 1) * 2;

Review comment:
       Looks like this test can be simplified. If the consistency status map will be notified on the repair task just started then we just "0/10000" instead of "1024/10000"). So, there is no need to implement complex logic for waiting specific events? WDYT?

##########
File path: modules/control-utility/src/test/java/org/apache/ignite/util/KillCommandsCommandShTest.java
##########
@@ -228,10 +231,14 @@ public void testCancelConsistencyTask() throws InterruptedException {
 
         cfg.setName(consistencyCancheName);
         cfg.setBackups(SERVER_NODE_CNT - 1);
+        cfg.setCacheMode(CacheMode.REPLICATED);

Review comment:
       This test passes with partitioned cache too. Why do we need set replicated here?




-- 
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