Cyrill commented on code in PR #2751:
URL: https://github.com/apache/ignite-3/pull/2751#discussion_r1378809742


##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/replicator/PartitionReplicaListener.java:
##########
@@ -1475,24 +1529,13 @@ private CompletableFuture<Void> cleanupWithRetry(
             UUID txId,
             TablePartitionId partitionId,
             int attempts) {
-        HybridTimestamp now = hybridClock.now();
-
-        return findPrimaryReplica(partitionId, now)
+        return findPrimaryReplica(partitionId, hybridClock.now())
                 .thenCompose(leaseHolder ->
-                        cleanupWithRetryOnReplica(commit, commitTimestamp, 
txId, partitionId, leaseHolder, attempts));
-    }
-
-    private CompletableFuture<Void> cleanupWithRetryOnReplica(
-            boolean commit,
-            @Nullable HybridTimestamp commitTimestamp,
-            UUID txId,
-            TablePartitionId partitionId,
-            String primaryConsistentId,
-            int attempts) {
-        return txManager.cleanup(primaryConsistentId, partitionId, txId, 
commit, commitTimestamp)
+                        txManager.cleanup(leaseHolder, partitionId, txId, 
commit, commitTimestamp))
                 .handle((res, ex) -> {
                     if (ex != null) {
-                        LOG.warn("Failed to perform cleanup on Tx {}." + 
(attempts > 0 ? " The operation will be retried." : ""), txId, ex);
+                        LOG.warn("Failed to perform cleanup on Tx {}." + 
(attempts > 0 ? " The operation will be retried." : ""),

Review Comment:
   done



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