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/08/18 13:11:34 UTC

[GitHub] [ignite] anton-vinogradov opened a new pull request #9342: IGNITE-15223 Control.sh should be able to perform Read Repair on specified partition.

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


   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] nizhikov commented on a change in pull request #9342: IGNITE-15223 Control.sh should be able to perform Read Repair on specified partition.

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



##########
File path: modules/core/src/main/java/org/apache/ignite/internal/visor/consistency/VisorConsistencyRepairTask.java
##########
@@ -0,0 +1,241 @@
+/*
+ * 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.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import javax.cache.CacheException;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.IgniteException;
+import org.apache.ignite.IgniteLogger;
+import org.apache.ignite.cluster.ClusterNode;
+import org.apache.ignite.compute.ComputeJobResult;
+import org.apache.ignite.events.CacheConsistencyViolationEvent;
+import org.apache.ignite.internal.processors.cache.CacheGroupContext;
+import org.apache.ignite.internal.processors.cache.GridCacheContext;
+import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtLocalPartition;
+import org.apache.ignite.internal.processors.cache.distributed.near.consistency.IgniteConsistencyViolationException;
+import org.apache.ignite.internal.processors.cache.persistence.CacheDataRow;
+import org.apache.ignite.internal.util.GridConcurrentHashSet;
+import org.apache.ignite.internal.util.lang.GridCursor;
+import org.apache.ignite.internal.visor.VisorJob;
+import org.apache.ignite.internal.visor.VisorMultiNodeTask;
+import org.apache.ignite.lang.IgnitePredicate;
+import org.apache.ignite.resources.LoggerResource;
+
+import static org.apache.ignite.events.EventType.EVT_CONSISTENCY_VIOLATION;
+
+/**
+ *
+ */
+public class VisorConsistencyRepairTask extends VisorMultiNodeTask<VisorConsistencyRepairTaskArg, String, String> {
+    /** Serial version uid. */
+    private static final long serialVersionUID = 0L;
+
+    /** Nothing found. */
+    private static final String NOTHING_FOUND = "Consistency violations were not found.";
+
+    /** Found. */
+    public static final String CONSISTENCY_VIOLATIONS_FOUND = "Consistency violations were FOUND";
+
+    /** Violations recorder. */
+    public static final String CONSISTENCY_VIOLATIONS_RECORDED = "Cache consistency violations recorded.";
+
+    /** {@inheritDoc} */
+    @Override protected VisorJob<VisorConsistencyRepairTaskArg, String> job(VisorConsistencyRepairTaskArg arg) {
+        return new VisorConsistencyRepairJob(arg, debug);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected String reduce0(List<ComputeJobResult> results) throws IgniteException {
+        StringBuilder sb = new StringBuilder();
+
+        for (ComputeJobResult res : results) {
+            String data = res.getData();
+
+            if (data != null)
+                sb.append("Node: ").append(res.getNode()).append("\n")
+                    .append("  Result: ").append(data).append("\n");
+        }
+
+        return sb.toString();
+    }
+
+    /**
+     *
+     */
+    private static class VisorConsistencyRepairJob extends VisorJob<VisorConsistencyRepairTaskArg, String> {
+        /** Serial version uid. */
+        private static final long serialVersionUID = 0L;
+
+        /** Injected logger. */
+        @LoggerResource
+        protected IgniteLogger log;
+
+        /** Events. */
+        private final Set<CacheConsistencyViolationEvent> evts = new GridConcurrentHashSet<>();
+
+        /**
+         * @param arg Arguments.
+         * @param debug Debug.
+         */
+        protected VisorConsistencyRepairJob(VisorConsistencyRepairTaskArg arg, boolean debug) {
+            super(arg, debug);
+        }
+
+        /** {@inheritDoc} */
+        @Override protected String run(VisorConsistencyRepairTaskArg arg) throws IgniteException {
+            String cacheName = arg.cacheName();
+            int p = arg.part();
+            int batchSize = 1024;
+
+            GridCacheContext<Object, Object> cctx = ignite.context().cache().cache(cacheName).context();
+
+            if (!cctx.gridEvents().isRecordable(EVT_CONSISTENCY_VIOLATION))
+                throw new UnsupportedOperationException("Consistency violation events recording is disabled on cluster.");
+
+            CacheGroupContext grpCtx = cctx.group();
+
+            GridDhtLocalPartition part = grpCtx.topology().localPartition(p);
+
+            if (part != null) {
+                part.reserve();
+
+                try {
+                    IgnitePredicate<CacheConsistencyViolationEvent> lsnr = new CacheConsistencyViolationEventListener();
+
+                    ignite.events().localListen(lsnr, EVT_CONSISTENCY_VIOLATION);
+
+                    try {
+                        Set<Object> keys = new HashSet<>();
+
+                        GridCursor<? extends CacheDataRow> cursor =
+                            grpCtx.offheap().dataStore(part).cursor(cctx.cacheId());
+
+                        IgniteCache<Object, Object> cache = ignite.cache(cacheName).withReadRepair();

Review comment:
       It seems we have to use `withKeepBinary` here to handle case when key class is obscene on the server node. Let's add tests for that case, also(caches with just `BinaryObject` and caches created by `CREATE TABLE`).




-- 
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] nizhikov commented on a change in pull request #9342: IGNITE-15223 Control.sh should be able to perform Read Repair on specified partition.

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



##########
File path: modules/core/src/main/java/org/apache/ignite/internal/visor/consistency/VisorConsistencyRepairTask.java
##########
@@ -0,0 +1,241 @@
+/*
+ * 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.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import javax.cache.CacheException;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.IgniteException;
+import org.apache.ignite.IgniteLogger;
+import org.apache.ignite.cluster.ClusterNode;
+import org.apache.ignite.compute.ComputeJobResult;
+import org.apache.ignite.events.CacheConsistencyViolationEvent;
+import org.apache.ignite.internal.processors.cache.CacheGroupContext;
+import org.apache.ignite.internal.processors.cache.GridCacheContext;
+import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtLocalPartition;
+import org.apache.ignite.internal.processors.cache.distributed.near.consistency.IgniteConsistencyViolationException;
+import org.apache.ignite.internal.processors.cache.persistence.CacheDataRow;
+import org.apache.ignite.internal.util.GridConcurrentHashSet;
+import org.apache.ignite.internal.util.lang.GridCursor;
+import org.apache.ignite.internal.visor.VisorJob;
+import org.apache.ignite.internal.visor.VisorMultiNodeTask;
+import org.apache.ignite.lang.IgnitePredicate;
+import org.apache.ignite.resources.LoggerResource;
+
+import static org.apache.ignite.events.EventType.EVT_CONSISTENCY_VIOLATION;
+
+/**
+ *
+ */
+public class VisorConsistencyRepairTask extends VisorMultiNodeTask<VisorConsistencyRepairTaskArg, String, String> {
+    /** Serial version uid. */
+    private static final long serialVersionUID = 0L;
+
+    /** Nothing found. */
+    private static final String NOTHING_FOUND = "Consistency violations were not found.";
+
+    /** Found. */
+    public static final String CONSISTENCY_VIOLATIONS_FOUND = "Consistency violations were FOUND";
+
+    /** Violations recorder. */
+    public static final String CONSISTENCY_VIOLATIONS_RECORDED = "Cache consistency violations recorded.";
+
+    /** {@inheritDoc} */
+    @Override protected VisorJob<VisorConsistencyRepairTaskArg, String> job(VisorConsistencyRepairTaskArg arg) {
+        return new VisorConsistencyRepairJob(arg, debug);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected String reduce0(List<ComputeJobResult> results) throws IgniteException {
+        StringBuilder sb = new StringBuilder();
+
+        for (ComputeJobResult res : results) {
+            String data = res.getData();
+
+            if (data != null)
+                sb.append("Node: ").append(res.getNode()).append("\n")
+                    .append("  Result: ").append(data).append("\n");
+        }
+
+        return sb.toString();
+    }
+
+    /**
+     *
+     */
+    private static class VisorConsistencyRepairJob extends VisorJob<VisorConsistencyRepairTaskArg, String> {
+        /** Serial version uid. */
+        private static final long serialVersionUID = 0L;
+
+        /** Injected logger. */
+        @LoggerResource
+        protected IgniteLogger log;
+
+        /** Events. */
+        private final Set<CacheConsistencyViolationEvent> evts = new GridConcurrentHashSet<>();
+
+        /**
+         * @param arg Arguments.
+         * @param debug Debug.
+         */
+        protected VisorConsistencyRepairJob(VisorConsistencyRepairTaskArg arg, boolean debug) {
+            super(arg, debug);
+        }
+
+        /** {@inheritDoc} */
+        @Override protected String run(VisorConsistencyRepairTaskArg arg) throws IgniteException {
+            String cacheName = arg.cacheName();
+            int p = arg.part();
+            int batchSize = 1024;
+
+            GridCacheContext<Object, Object> cctx = ignite.context().cache().cache(cacheName).context();
+
+            if (!cctx.gridEvents().isRecordable(EVT_CONSISTENCY_VIOLATION))
+                throw new UnsupportedOperationException("Consistency violation events recording is disabled on cluster.");
+
+            CacheGroupContext grpCtx = cctx.group();
+
+            GridDhtLocalPartition part = grpCtx.topology().localPartition(p);
+
+            if (part != null) {

Review comment:
       Let's rewrite it with 
   
   ```
   if (part == null)
       return null;
   
   // Other logic goes here.
   ```
   
   to reduce indentation level.




-- 
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 #9342: IGNITE-15223 Control.sh should be able to perform Read Repair on specified partition.

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


   


-- 
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] nizhikov commented on a change in pull request #9342: IGNITE-15223 Control.sh should be able to perform Read Repair on specified partition.

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



##########
File path: modules/control-utility/src/main/java/org/apache/ignite/internal/commandline/ActivateCommand.java
##########
@@ -35,7 +35,7 @@
 public class ActivateCommand extends AbstractCommand<Void> {
     /** {@inheritDoc} */
     @Override public void printUsage(Logger logger) {
-        Command.usage(logger, "Activate cluster (deprecated. Use " + SET_STATE.toString() + " instead):", ACTIVATE);

Review comment:
       Why this change?




-- 
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 #9342: IGNITE-15223 Control.sh should be able to perform Read Repair on specified partition.

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



##########
File path: modules/core/src/main/java/org/apache/ignite/internal/visor/consistency/VisorConsistencyRepairTask.java
##########
@@ -0,0 +1,241 @@
+/*
+ * 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.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import javax.cache.CacheException;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.IgniteException;
+import org.apache.ignite.IgniteLogger;
+import org.apache.ignite.cluster.ClusterNode;
+import org.apache.ignite.compute.ComputeJobResult;
+import org.apache.ignite.events.CacheConsistencyViolationEvent;
+import org.apache.ignite.internal.processors.cache.CacheGroupContext;
+import org.apache.ignite.internal.processors.cache.GridCacheContext;
+import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtLocalPartition;
+import org.apache.ignite.internal.processors.cache.distributed.near.consistency.IgniteConsistencyViolationException;
+import org.apache.ignite.internal.processors.cache.persistence.CacheDataRow;
+import org.apache.ignite.internal.util.GridConcurrentHashSet;
+import org.apache.ignite.internal.util.lang.GridCursor;
+import org.apache.ignite.internal.visor.VisorJob;
+import org.apache.ignite.internal.visor.VisorMultiNodeTask;
+import org.apache.ignite.lang.IgnitePredicate;
+import org.apache.ignite.resources.LoggerResource;
+
+import static org.apache.ignite.events.EventType.EVT_CONSISTENCY_VIOLATION;
+
+/**
+ *
+ */
+public class VisorConsistencyRepairTask extends VisorMultiNodeTask<VisorConsistencyRepairTaskArg, String, String> {
+    /** Serial version uid. */
+    private static final long serialVersionUID = 0L;
+
+    /** Nothing found. */
+    private static final String NOTHING_FOUND = "Consistency violations were not found.";
+
+    /** Found. */
+    public static final String CONSISTENCY_VIOLATIONS_FOUND = "Consistency violations were FOUND";
+
+    /** Violations recorder. */
+    public static final String CONSISTENCY_VIOLATIONS_RECORDED = "Cache consistency violations recorded.";
+
+    /** {@inheritDoc} */
+    @Override protected VisorJob<VisorConsistencyRepairTaskArg, String> job(VisorConsistencyRepairTaskArg arg) {
+        return new VisorConsistencyRepairJob(arg, debug);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected String reduce0(List<ComputeJobResult> results) throws IgniteException {
+        StringBuilder sb = new StringBuilder();
+
+        for (ComputeJobResult res : results) {
+            String data = res.getData();
+
+            if (data != null)
+                sb.append("Node: ").append(res.getNode()).append("\n")
+                    .append("  Result: ").append(data).append("\n");
+        }
+
+        return sb.toString();
+    }
+
+    /**
+     *
+     */
+    private static class VisorConsistencyRepairJob extends VisorJob<VisorConsistencyRepairTaskArg, String> {
+        /** Serial version uid. */
+        private static final long serialVersionUID = 0L;
+
+        /** Injected logger. */
+        @LoggerResource
+        protected IgniteLogger log;
+
+        /** Events. */
+        private final Set<CacheConsistencyViolationEvent> evts = new GridConcurrentHashSet<>();
+
+        /**
+         * @param arg Arguments.
+         * @param debug Debug.
+         */
+        protected VisorConsistencyRepairJob(VisorConsistencyRepairTaskArg arg, boolean debug) {
+            super(arg, debug);
+        }
+
+        /** {@inheritDoc} */
+        @Override protected String run(VisorConsistencyRepairTaskArg arg) throws IgniteException {
+            String cacheName = arg.cacheName();
+            int p = arg.part();
+            int batchSize = 1024;
+
+            GridCacheContext<Object, Object> cctx = ignite.context().cache().cache(cacheName).context();
+
+            if (!cctx.gridEvents().isRecordable(EVT_CONSISTENCY_VIOLATION))
+                throw new UnsupportedOperationException("Consistency violation events recording is disabled on cluster.");
+
+            CacheGroupContext grpCtx = cctx.group();
+
+            GridDhtLocalPartition part = grpCtx.topology().localPartition(p);
+
+            if (part != null) {
+                part.reserve();
+
+                try {
+                    IgnitePredicate<CacheConsistencyViolationEvent> lsnr = new CacheConsistencyViolationEventListener();
+
+                    ignite.events().localListen(lsnr, EVT_CONSISTENCY_VIOLATION);
+
+                    try {
+                        Set<Object> keys = new HashSet<>();
+
+                        GridCursor<? extends CacheDataRow> cursor =
+                            grpCtx.offheap().dataStore(part).cursor(cctx.cacheId());
+
+                        IgniteCache<Object, Object> cache = ignite.cache(cacheName).withReadRepair();

Review comment:
       Found a bug here.
   It Will be fixed at IGNITE-15482
   




-- 
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] nizhikov commented on a change in pull request #9342: IGNITE-15223 Control.sh should be able to perform Read Repair on specified partition.

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



##########
File path: modules/core/src/main/java/org/apache/ignite/internal/visor/consistency/VisorConsistencyRepairTaskArg.java
##########
@@ -0,0 +1,80 @@
+/*
+ * 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.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+import org.apache.ignite.internal.dto.IgniteDataTransferObject;
+import org.apache.ignite.internal.util.typedef.internal.U;
+
+/**
+ *
+ */
+public class VisorConsistencyRepairTaskArg extends IgniteDataTransferObject {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /** Cache name. */
+    private String cacheName;
+
+    /** Partition. */
+    private Integer part;

Review comment:
       Can this variable be `int`?




-- 
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 #9342: IGNITE-15223 Control.sh should be able to perform Read Repair on specified partition.

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



##########
File path: modules/core/src/main/java/org/apache/ignite/internal/visor/consistency/VisorConsistencyRepairTaskArg.java
##########
@@ -0,0 +1,80 @@
+/*
+ * 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.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+import org.apache.ignite.internal.dto.IgniteDataTransferObject;
+import org.apache.ignite.internal.util.typedef.internal.U;
+
+/**
+ *
+ */
+public class VisorConsistencyRepairTaskArg extends IgniteDataTransferObject {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /** Cache name. */
+    private String cacheName;
+
+    /** Partition. */
+    private Integer part;

Review comment:
       Sure




-- 
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] nizhikov commented on a change in pull request #9342: IGNITE-15223 Control.sh should be able to perform Read Repair on specified partition.

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



##########
File path: modules/core/src/main/java/org/apache/ignite/internal/visor/consistency/VisorConsistencyRepairTask.java
##########
@@ -0,0 +1,241 @@
+/*
+ * 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.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import javax.cache.CacheException;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.IgniteException;
+import org.apache.ignite.IgniteLogger;
+import org.apache.ignite.cluster.ClusterNode;
+import org.apache.ignite.compute.ComputeJobResult;
+import org.apache.ignite.events.CacheConsistencyViolationEvent;
+import org.apache.ignite.internal.processors.cache.CacheGroupContext;
+import org.apache.ignite.internal.processors.cache.GridCacheContext;
+import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtLocalPartition;
+import org.apache.ignite.internal.processors.cache.distributed.near.consistency.IgniteConsistencyViolationException;
+import org.apache.ignite.internal.processors.cache.persistence.CacheDataRow;
+import org.apache.ignite.internal.util.GridConcurrentHashSet;
+import org.apache.ignite.internal.util.lang.GridCursor;
+import org.apache.ignite.internal.visor.VisorJob;
+import org.apache.ignite.internal.visor.VisorMultiNodeTask;
+import org.apache.ignite.lang.IgnitePredicate;
+import org.apache.ignite.resources.LoggerResource;
+
+import static org.apache.ignite.events.EventType.EVT_CONSISTENCY_VIOLATION;
+
+/**
+ *
+ */
+public class VisorConsistencyRepairTask extends VisorMultiNodeTask<VisorConsistencyRepairTaskArg, String, String> {
+    /** Serial version uid. */
+    private static final long serialVersionUID = 0L;
+
+    /** Nothing found. */
+    private static final String NOTHING_FOUND = "Consistency violations were not found.";
+
+    /** Found. */
+    public static final String CONSISTENCY_VIOLATIONS_FOUND = "Consistency violations were FOUND";
+
+    /** Violations recorder. */
+    public static final String CONSISTENCY_VIOLATIONS_RECORDED = "Cache consistency violations recorded.";
+
+    /** {@inheritDoc} */
+    @Override protected VisorJob<VisorConsistencyRepairTaskArg, String> job(VisorConsistencyRepairTaskArg arg) {
+        return new VisorConsistencyRepairJob(arg, debug);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected String reduce0(List<ComputeJobResult> results) throws IgniteException {
+        StringBuilder sb = new StringBuilder();
+
+        for (ComputeJobResult res : results) {
+            String data = res.getData();
+
+            if (data != null)
+                sb.append("Node: ").append(res.getNode()).append("\n")
+                    .append("  Result: ").append(data).append("\n");
+        }
+
+        return sb.toString();
+    }
+
+    /**
+     *
+     */
+    private static class VisorConsistencyRepairJob extends VisorJob<VisorConsistencyRepairTaskArg, String> {
+        /** Serial version uid. */
+        private static final long serialVersionUID = 0L;
+
+        /** Injected logger. */
+        @LoggerResource
+        protected IgniteLogger log;
+
+        /** Events. */
+        private final Set<CacheConsistencyViolationEvent> evts = new GridConcurrentHashSet<>();
+
+        /**
+         * @param arg Arguments.
+         * @param debug Debug.
+         */
+        protected VisorConsistencyRepairJob(VisorConsistencyRepairTaskArg arg, boolean debug) {
+            super(arg, debug);
+        }
+
+        /** {@inheritDoc} */
+        @Override protected String run(VisorConsistencyRepairTaskArg arg) throws IgniteException {
+            String cacheName = arg.cacheName();
+            int p = arg.part();
+            int batchSize = 1024;

Review comment:
       This variable can be inlined




-- 
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 #9342: IGNITE-15223 Control.sh should be able to perform Read Repair on specified partition.

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



##########
File path: modules/core/src/main/java/org/apache/ignite/internal/visor/consistency/VisorConsistencyRepairTask.java
##########
@@ -0,0 +1,241 @@
+/*
+ * 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.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import javax.cache.CacheException;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.IgniteException;
+import org.apache.ignite.IgniteLogger;
+import org.apache.ignite.cluster.ClusterNode;
+import org.apache.ignite.compute.ComputeJobResult;
+import org.apache.ignite.events.CacheConsistencyViolationEvent;
+import org.apache.ignite.internal.processors.cache.CacheGroupContext;
+import org.apache.ignite.internal.processors.cache.GridCacheContext;
+import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtLocalPartition;
+import org.apache.ignite.internal.processors.cache.distributed.near.consistency.IgniteConsistencyViolationException;
+import org.apache.ignite.internal.processors.cache.persistence.CacheDataRow;
+import org.apache.ignite.internal.util.GridConcurrentHashSet;
+import org.apache.ignite.internal.util.lang.GridCursor;
+import org.apache.ignite.internal.visor.VisorJob;
+import org.apache.ignite.internal.visor.VisorMultiNodeTask;
+import org.apache.ignite.lang.IgnitePredicate;
+import org.apache.ignite.resources.LoggerResource;
+
+import static org.apache.ignite.events.EventType.EVT_CONSISTENCY_VIOLATION;
+
+/**
+ *
+ */
+public class VisorConsistencyRepairTask extends VisorMultiNodeTask<VisorConsistencyRepairTaskArg, String, String> {
+    /** Serial version uid. */
+    private static final long serialVersionUID = 0L;
+
+    /** Nothing found. */
+    private static final String NOTHING_FOUND = "Consistency violations were not found.";
+
+    /** Found. */
+    public static final String CONSISTENCY_VIOLATIONS_FOUND = "Consistency violations were FOUND";
+
+    /** Violations recorder. */
+    public static final String CONSISTENCY_VIOLATIONS_RECORDED = "Cache consistency violations recorded.";
+
+    /** {@inheritDoc} */
+    @Override protected VisorJob<VisorConsistencyRepairTaskArg, String> job(VisorConsistencyRepairTaskArg arg) {
+        return new VisorConsistencyRepairJob(arg, debug);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected String reduce0(List<ComputeJobResult> results) throws IgniteException {
+        StringBuilder sb = new StringBuilder();
+
+        for (ComputeJobResult res : results) {
+            String data = res.getData();
+
+            if (data != null)
+                sb.append("Node: ").append(res.getNode()).append("\n")
+                    .append("  Result: ").append(data).append("\n");
+        }
+
+        return sb.toString();
+    }
+
+    /**
+     *
+     */
+    private static class VisorConsistencyRepairJob extends VisorJob<VisorConsistencyRepairTaskArg, String> {
+        /** Serial version uid. */
+        private static final long serialVersionUID = 0L;
+
+        /** Injected logger. */
+        @LoggerResource
+        protected IgniteLogger log;
+
+        /** Events. */
+        private final Set<CacheConsistencyViolationEvent> evts = new GridConcurrentHashSet<>();
+
+        /**
+         * @param arg Arguments.
+         * @param debug Debug.
+         */
+        protected VisorConsistencyRepairJob(VisorConsistencyRepairTaskArg arg, boolean debug) {
+            super(arg, debug);
+        }
+
+        /** {@inheritDoc} */
+        @Override protected String run(VisorConsistencyRepairTaskArg arg) throws IgniteException {
+            String cacheName = arg.cacheName();
+            int p = arg.part();
+            int batchSize = 1024;
+
+            GridCacheContext<Object, Object> cctx = ignite.context().cache().cache(cacheName).context();
+
+            if (!cctx.gridEvents().isRecordable(EVT_CONSISTENCY_VIOLATION))
+                throw new UnsupportedOperationException("Consistency violation events recording is disabled on cluster.");
+
+            CacheGroupContext grpCtx = cctx.group();
+
+            GridDhtLocalPartition part = grpCtx.topology().localPartition(p);
+
+            if (part != null) {
+                part.reserve();
+
+                try {
+                    IgnitePredicate<CacheConsistencyViolationEvent> lsnr = new CacheConsistencyViolationEventListener();
+
+                    ignite.events().localListen(lsnr, EVT_CONSISTENCY_VIOLATION);
+
+                    try {
+                        Set<Object> keys = new HashSet<>();
+
+                        GridCursor<? extends CacheDataRow> cursor =
+                            grpCtx.offheap().dataStore(part).cursor(cctx.cacheId());
+
+                        IgniteCache<Object, Object> cache = ignite.cache(cacheName).withReadRepair();

Review comment:
       Found a bug here.
   It will be fixed at IGNITE-15482
   




-- 
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 #9342: IGNITE-15223 Control.sh should be able to perform Read Repair on specified partition.

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



##########
File path: modules/core/src/main/java/org/apache/ignite/internal/visor/consistency/VisorConsistencyRepairTask.java
##########
@@ -0,0 +1,241 @@
+/*
+ * 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.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import javax.cache.CacheException;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.IgniteException;
+import org.apache.ignite.IgniteLogger;
+import org.apache.ignite.cluster.ClusterNode;
+import org.apache.ignite.compute.ComputeJobResult;
+import org.apache.ignite.events.CacheConsistencyViolationEvent;
+import org.apache.ignite.internal.processors.cache.CacheGroupContext;
+import org.apache.ignite.internal.processors.cache.GridCacheContext;
+import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtLocalPartition;
+import org.apache.ignite.internal.processors.cache.distributed.near.consistency.IgniteConsistencyViolationException;
+import org.apache.ignite.internal.processors.cache.persistence.CacheDataRow;
+import org.apache.ignite.internal.util.GridConcurrentHashSet;
+import org.apache.ignite.internal.util.lang.GridCursor;
+import org.apache.ignite.internal.visor.VisorJob;
+import org.apache.ignite.internal.visor.VisorMultiNodeTask;
+import org.apache.ignite.lang.IgnitePredicate;
+import org.apache.ignite.resources.LoggerResource;
+
+import static org.apache.ignite.events.EventType.EVT_CONSISTENCY_VIOLATION;
+
+/**
+ *
+ */
+public class VisorConsistencyRepairTask extends VisorMultiNodeTask<VisorConsistencyRepairTaskArg, String, String> {
+    /** Serial version uid. */
+    private static final long serialVersionUID = 0L;
+
+    /** Nothing found. */
+    private static final String NOTHING_FOUND = "Consistency violations were not found.";
+
+    /** Found. */
+    public static final String CONSISTENCY_VIOLATIONS_FOUND = "Consistency violations were FOUND";
+
+    /** Violations recorder. */
+    public static final String CONSISTENCY_VIOLATIONS_RECORDED = "Cache consistency violations recorded.";
+
+    /** {@inheritDoc} */
+    @Override protected VisorJob<VisorConsistencyRepairTaskArg, String> job(VisorConsistencyRepairTaskArg arg) {
+        return new VisorConsistencyRepairJob(arg, debug);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected String reduce0(List<ComputeJobResult> results) throws IgniteException {
+        StringBuilder sb = new StringBuilder();
+
+        for (ComputeJobResult res : results) {
+            String data = res.getData();
+
+            if (data != null)
+                sb.append("Node: ").append(res.getNode()).append("\n")
+                    .append("  Result: ").append(data).append("\n");
+        }
+
+        return sb.toString();
+    }
+
+    /**
+     *
+     */
+    private static class VisorConsistencyRepairJob extends VisorJob<VisorConsistencyRepairTaskArg, String> {
+        /** Serial version uid. */
+        private static final long serialVersionUID = 0L;
+
+        /** Injected logger. */
+        @LoggerResource
+        protected IgniteLogger log;
+
+        /** Events. */
+        private final Set<CacheConsistencyViolationEvent> evts = new GridConcurrentHashSet<>();
+
+        /**
+         * @param arg Arguments.
+         * @param debug Debug.
+         */
+        protected VisorConsistencyRepairJob(VisorConsistencyRepairTaskArg arg, boolean debug) {
+            super(arg, debug);
+        }
+
+        /** {@inheritDoc} */
+        @Override protected String run(VisorConsistencyRepairTaskArg arg) throws IgniteException {
+            String cacheName = arg.cacheName();
+            int p = arg.part();
+            int batchSize = 1024;
+
+            GridCacheContext<Object, Object> cctx = ignite.context().cache().cache(cacheName).context();
+
+            if (!cctx.gridEvents().isRecordable(EVT_CONSISTENCY_VIOLATION))
+                throw new UnsupportedOperationException("Consistency violation events recording is disabled on cluster.");
+
+            CacheGroupContext grpCtx = cctx.group();
+
+            GridDhtLocalPartition part = grpCtx.topology().localPartition(p);
+
+            if (part != null) {

Review comment:
       Fixed




-- 
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 #9342: IGNITE-15223 Control.sh should be able to perform Read Repair on specified partition.

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



##########
File path: modules/control-utility/src/main/java/org/apache/ignite/internal/commandline/ActivateCommand.java
##########
@@ -35,7 +35,7 @@
 public class ActivateCommand extends AbstractCommand<Void> {
     /** {@inheritDoc} */
     @Override public void printUsage(Logger logger) {
-        Command.usage(logger, "Activate cluster (deprecated. Use " + SET_STATE.toString() + " instead):", ACTIVATE);

Review comment:
       This chance is to write an explicit [EXPERIMENTAL] flag at UI.




-- 
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 #9342: IGNITE-15223 Control.sh should be able to perform Read Repair on specified partition.

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



##########
File path: modules/core/src/main/java/org/apache/ignite/internal/visor/consistency/VisorConsistencyRepairTask.java
##########
@@ -0,0 +1,241 @@
+/*
+ * 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.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import javax.cache.CacheException;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.IgniteException;
+import org.apache.ignite.IgniteLogger;
+import org.apache.ignite.cluster.ClusterNode;
+import org.apache.ignite.compute.ComputeJobResult;
+import org.apache.ignite.events.CacheConsistencyViolationEvent;
+import org.apache.ignite.internal.processors.cache.CacheGroupContext;
+import org.apache.ignite.internal.processors.cache.GridCacheContext;
+import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtLocalPartition;
+import org.apache.ignite.internal.processors.cache.distributed.near.consistency.IgniteConsistencyViolationException;
+import org.apache.ignite.internal.processors.cache.persistence.CacheDataRow;
+import org.apache.ignite.internal.util.GridConcurrentHashSet;
+import org.apache.ignite.internal.util.lang.GridCursor;
+import org.apache.ignite.internal.visor.VisorJob;
+import org.apache.ignite.internal.visor.VisorMultiNodeTask;
+import org.apache.ignite.lang.IgnitePredicate;
+import org.apache.ignite.resources.LoggerResource;
+
+import static org.apache.ignite.events.EventType.EVT_CONSISTENCY_VIOLATION;
+
+/**
+ *
+ */
+public class VisorConsistencyRepairTask extends VisorMultiNodeTask<VisorConsistencyRepairTaskArg, String, String> {
+    /** Serial version uid. */
+    private static final long serialVersionUID = 0L;
+
+    /** Nothing found. */
+    private static final String NOTHING_FOUND = "Consistency violations were not found.";
+
+    /** Found. */
+    public static final String CONSISTENCY_VIOLATIONS_FOUND = "Consistency violations were FOUND";
+
+    /** Violations recorder. */
+    public static final String CONSISTENCY_VIOLATIONS_RECORDED = "Cache consistency violations recorded.";
+
+    /** {@inheritDoc} */
+    @Override protected VisorJob<VisorConsistencyRepairTaskArg, String> job(VisorConsistencyRepairTaskArg arg) {
+        return new VisorConsistencyRepairJob(arg, debug);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected String reduce0(List<ComputeJobResult> results) throws IgniteException {
+        StringBuilder sb = new StringBuilder();
+
+        for (ComputeJobResult res : results) {
+            String data = res.getData();
+
+            if (data != null)
+                sb.append("Node: ").append(res.getNode()).append("\n")
+                    .append("  Result: ").append(data).append("\n");
+        }
+
+        return sb.toString();
+    }
+
+    /**
+     *
+     */
+    private static class VisorConsistencyRepairJob extends VisorJob<VisorConsistencyRepairTaskArg, String> {
+        /** Serial version uid. */
+        private static final long serialVersionUID = 0L;
+
+        /** Injected logger. */
+        @LoggerResource
+        protected IgniteLogger log;
+
+        /** Events. */
+        private final Set<CacheConsistencyViolationEvent> evts = new GridConcurrentHashSet<>();
+
+        /**
+         * @param arg Arguments.
+         * @param debug Debug.
+         */
+        protected VisorConsistencyRepairJob(VisorConsistencyRepairTaskArg arg, boolean debug) {
+            super(arg, debug);
+        }
+
+        /** {@inheritDoc} */
+        @Override protected String run(VisorConsistencyRepairTaskArg arg) throws IgniteException {
+            String cacheName = arg.cacheName();
+            int p = arg.part();
+            int batchSize = 1024;

Review comment:
       Idea is to make it configurable later.




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