denis-chudov commented on code in PR #4612:
URL: https://github.com/apache/ignite-3/pull/4612#discussion_r1812298367


##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/replicator/PartitionReplicaListener.java:
##########
@@ -2662,20 +2662,32 @@ private <T> void 
applyCmdWithRetryOnSafeTimeReorderException(Command cmd, Comple
                     new 
ReplicationMaxRetriesExceededException(replicationGroupId, 
MAX_RETIES_ON_SAFE_TIME_REORDERING));

Review Comment:
   ```suggestion
                       new 
ReplicationMaxRetriesExceededException(replicationGroupId, 
MAX_RETRIES_ON_SAFE_TIME_REORDERING));
   ```



##########
modules/core/src/main/java/org/apache/ignite/internal/lang/SafeTimeReorderException.java:
##########
@@ -23,13 +23,26 @@
  * This exception is used to indicate a detection of a safe time reordering.
  */
 public class SafeTimeReorderException extends IgniteInternalException {
+    /** maxObservableSafeTime at the moment of violation. */
+    private final long maxObservableSafeTimeViolatedValue;
 
     /**
      * The constructor.
+     *
+     * @param maxObservableSafeTimeViolatedValue maxObservableSafeTime at the 
moment of violation
      */
-    public SafeTimeReorderException() {
+    public SafeTimeReorderException(long maxObservableSafeTimeViolatedValue) {
         super(REPLICATION_SAFE_TIME_REORDERING_ERR, "Replication safe time 
reordering detected.");
+        this.maxObservableSafeTimeViolatedValue = 
maxObservableSafeTimeViolatedValue;
     }
 
+    /**
+     * maxObservableSafeTime at the moment of violation.

Review Comment:
   ```suggestion
        * {@code maxObservableSafeTime} at the moment of violation.
   ```



##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/replicator/PartitionReplicaListener.java:
##########
@@ -2662,20 +2662,32 @@ private <T> void 
applyCmdWithRetryOnSafeTimeReorderException(Command cmd, Comple
                     new 
ReplicationMaxRetriesExceededException(replicationGroupId, 
MAX_RETIES_ON_SAFE_TIME_REORDERING));
         }
 
+        int attemptsCounter0 = attemptsCounter;

Review Comment:
   why not move it to whenComplete block?



-- 
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-unsubscr...@ignite.apache.org

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

Reply via email to