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 2022/08/24 10:35:44 UTC

[GitHub] [ignite] anton-vinogradov opened a new pull request, #10213: IGNITE-17191 Consistency check should support cacheGroup as a param as well

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

   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] ivandasch commented on a diff in pull request #10213: IGNITE-17191 Consistency check should support cacheGroup as a param as well

Posted by GitBox <gi...@apache.org>.
ivandasch commented on code in PR #10213:
URL: https://github.com/apache/ignite/pull/10213#discussion_r955957417


##########
modules/core/src/main/java/org/apache/ignite/internal/visor/consistency/VisorConsistencyRepairTask.java:
##########
@@ -292,13 +326,33 @@ private CacheConsistencyViolationEventListener(String name) {
             @Override public boolean apply(CacheConsistencyViolationEvent evt) {
                 assert evt instanceof CacheConsistencyViolationEvent;
 
-                if (!evt.getCacheName().equals(cacheName))
+                if (!cacheNames.contains(evt.getCacheName()))
                     return true; // Skipping other caches results, which are generated by concurrent executions.
 
                 evts.add(evt);
 
                 return true;
             }
         }
+
+        /**
+         *
+         */
+        private static class PerCacheBatch {
+            /** Cache. */
+            private final IgniteCache<Object, Object> cache;
+
+            /** Keys. */
+            private final Set<Object> keys;
+
+            /**
+             * @param cache Cache.
+             * @param keys Keys.
+             */
+            public PerCacheBatch(IgniteCache<Object, Object> cache, Set<Object> keys) {

Review Comment:
   This constructor is always called with empty keys, seems that it should be changed a little bit : an empty hash set could be created during initialization



-- 
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 diff in pull request #10213: IGNITE-17191 Consistency check should support cacheGroup as a param as well

Posted by GitBox <gi...@apache.org>.
anton-vinogradov commented on code in PR #10213:
URL: https://github.com/apache/ignite/pull/10213#discussion_r955966778


##########
modules/core/src/main/java/org/apache/ignite/internal/visor/consistency/VisorConsistencyRepairTask.java:
##########
@@ -117,73 +125,84 @@ protected VisorConsistencyRepairJob(VisorConsistencyRepairTaskArg arg, boolean d
             log.info("Consistency check started " +
                 "[grp=" + grpCtx.cacheOrGroupName() + ", part=" + p + ", strategy=" + strategy + "]");
 
-            StringBuilder sb = new StringBuilder();
-
-            sb.append("[node=").append(ignite.localNode());
-            sb.append(", cacheGroup=").append(grpCtx.cacheOrGroupName());
-            sb.append(", part=").append(p).append("]");
-
-            String statusKey = sb.toString();
+            String statusKey = "[node=" + ignite.localNode() + ", cacheGroup=" + grpCtx.cacheOrGroupName() + ", part=" + p + "]";
 
             if (VisorConsistencyStatusTask.MAP.putIfAbsent(statusKey, "0/" + part.fullSize()) != 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 diff in pull request #10213: IGNITE-17191 Consistency check should support cacheGroup as a param as well

Posted by GitBox <gi...@apache.org>.
anton-vinogradov commented on code in PR #10213:
URL: https://github.com/apache/ignite/pull/10213#discussion_r955968117


##########
modules/core/src/main/java/org/apache/ignite/internal/visor/consistency/VisorConsistencyRepairTask.java:
##########
@@ -292,13 +326,33 @@ private CacheConsistencyViolationEventListener(String name) {
             @Override public boolean apply(CacheConsistencyViolationEvent evt) {
                 assert evt instanceof CacheConsistencyViolationEvent;
 
-                if (!evt.getCacheName().equals(cacheName))
+                if (!cacheNames.contains(evt.getCacheName()))
                     return true; // Skipping other caches results, which are generated by concurrent executions.
 
                 evts.add(evt);
 
                 return true;
             }
         }
+
+        /**
+         *
+         */
+        private static class PerCacheBatch {
+            /** Cache. */
+            private final IgniteCache<Object, Object> cache;
+
+            /** Keys. */
+            private final Set<Object> keys;
+
+            /**
+             * @param cache Cache.
+             * @param keys Keys.
+             */
+            public PerCacheBatch(IgniteCache<Object, Object> cache, Set<Object> keys) {

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] ivandasch commented on a diff in pull request #10213: IGNITE-17191 Consistency check should support cacheGroup as a param as well

Posted by GitBox <gi...@apache.org>.
ivandasch commented on code in PR #10213:
URL: https://github.com/apache/ignite/pull/10213#discussion_r955955764


##########
modules/core/src/main/java/org/apache/ignite/internal/visor/consistency/VisorConsistencyRepairTask.java:
##########
@@ -117,73 +125,84 @@ protected VisorConsistencyRepairJob(VisorConsistencyRepairTaskArg arg, boolean d
             log.info("Consistency check started " +
                 "[grp=" + grpCtx.cacheOrGroupName() + ", part=" + p + ", strategy=" + strategy + "]");
 
-            StringBuilder sb = new StringBuilder();
-
-            sb.append("[node=").append(ignite.localNode());
-            sb.append(", cacheGroup=").append(grpCtx.cacheOrGroupName());
-            sb.append(", part=").append(p).append("]");
-
-            String statusKey = sb.toString();
+            String statusKey = "[node=" + ignite.localNode() + ", cacheGroup=" + grpCtx.cacheOrGroupName() + ", part=" + p + "]";
 
             if (VisorConsistencyStatusTask.MAP.putIfAbsent(statusKey, "0/" + part.fullSize()) != null)

Review Comment:
   This isn't an one-liner conditional branch, so it should be in curly braces



-- 
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 #10213: IGNITE-17191 Consistency check should support cacheGroup as a param as well

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


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