ascherbakoff commented on code in PR #4821:
URL: https://github.com/apache/ignite-3/pull/4821#discussion_r1881617544


##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/replicator/PartitionReplicaListener.java:
##########
@@ -1837,23 +1820,19 @@ private CompletableFuture<Object> applyFinishCommand(
             int catalogVersion,
             List<TablePartitionIdMessage> partitionIds
     ) {
-        synchronized (commandProcessingLinearizationMutex) {
-            FinishTxCommandBuilder finishTxCmdBldr = 
PARTITION_REPLICATION_MESSAGES_FACTORY.finishTxCommand()
-                    .txId(transactionId)
-                    .commit(commit)
-                    .safeTime(clockService.now())
-                    .requiredCatalogVersion(catalogVersion)
-                    .partitionIds(partitionIds);
-
-            if (commit) {
-                finishTxCmdBldr.commitTimestamp(commitTimestamp);
-            }
-            CompletableFuture<Object> resultFuture = new CompletableFuture<>();
-
-            
applyCmdWithRetryOnSafeTimeReorderException(finishTxCmdBldr.build(), 
resultFuture);
+        HybridTimestamp now = clockService.now();
+        FinishTxCommandBuilder finishTxCmdBldr = 
PARTITION_REPLICATION_MESSAGES_FACTORY.finishTxCommand()
+                .txId(transactionId)
+                .commit(commit)
+                .initiatorTime(now)
+                .requiredCatalogVersion(catalogVersion)
+                .partitionIds(partitionIds);
 
-            return resultFuture;
+        if (commit) {
+            finishTxCmdBldr.commitTimestamp(commitTimestamp);

Review Comment:
   This section of txn IEP covers commit ts generation for this place: 
https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=211885498#IEP91:Transactionprotocol-Thealgorithm
   Actually, this part of code was not changes and corresponds to lines 
1848-8150 in master.
   safeTs is equal to commit ts for "full" transactions (which keyset is known 
apriori), which are committed in one step.
   The whole topic is rather complex and I think other reviewer can take up 
this part of the review.
   



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