rpuch commented on code in PR #2820:
URL: https://github.com/apache/ignite-3/pull/2820#discussion_r1389054077


##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/replicator/PartitionReplicaListener.java:
##########
@@ -2420,34 +2490,40 @@ private CompletableFuture<CompletableFuture<?>> 
applyUpdateCommand(
             );
 
             if (!cmd.full()) {
-                CompletableFuture<UUID> fut = 
applyCmdWithExceptionHandling(cmd).thenApply(res -> {
+                // TODO: https://issues.apache.org/jira/browse/IGNITE-20124 
Temporary code below
+                synchronized (safeTime) {
+                    storageUpdateHandler.handleUpdate(
+                            cmd.txId(),
+                            cmd.rowUuid(),
+                            cmd.tablePartitionId().asTablePartitionId(),
+                            cmd.rowToUpdate(),
+                            true,
+                            null,
+                            null,
+                            null);
+
+                    updateTrackerIgnoringTrackerClosedException(safeTime, 
cmd.safeTime());
+                }
+
+                CompletableFuture<Object> resultFuture = new 
CompletableFuture<>();
+
+                applyCmdWithExceptionHandling(cmd, resultFuture);

Review Comment:
   ~So we just applied the command on the Primary, and then we send it to Raft 
with the same SafeTime? Will not this mean that the command will be rejected 
with probability equal to 100%?~
   
   No, that's not the case as `PartitionListener` looks at its local 'last 
observed SafeTime ts'.



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