timoninmaxim commented on a change in pull request #9661:
URL: https://github.com/apache/ignite/pull/9661#discussion_r785886169



##########
File path: 
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/consistency/IgniteConsistencyViolationException.java
##########
@@ -17,20 +17,35 @@
 
 package 
org.apache.ignite.internal.processors.cache.distributed.near.consistency;
 
+import java.util.Set;
 import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.internal.processors.cache.KeyCacheObject;
 
 /**
- * Possible consistency violation exception.
- * Each such case should be rechecked under locks.
+ * Consistency violation exception.
  */
 public class IgniteConsistencyViolationException extends 
IgniteCheckedException {
     /** */
     private static final long serialVersionUID = 0L;
 
+    /** Inconsistent entries keys. */
+    private final Set<KeyCacheObject> keys;
+
+    /**
+     * @param keys Keys.
+     */
+    public IgniteConsistencyViolationException(Set<KeyCacheObject> keys) {
+        super("Distributed cache consistency violation detected.");
+
+        assert keys != null && !keys.isEmpty();
+
+        this.keys = keys;
+    }
+
     /**
-     * @param msg Message.
+     * Found but unrepaired (because of chosen strategy) inconsistent entries 
keys.

Review comment:
       A little bit misleading. Keys aren't repaired because Ignite hasn't 
tried to repair them. Ignite throws `IrreparableException` if it didn't repair 
keys because of strategy, don't it?




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to