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


##########
modules/transactions/src/main/java/org/apache/ignite/internal/tx/impl/TxCleanupRequestHandler.java:
##########
@@ -156,11 +170,98 @@ private NetworkMessage prepareResponse() {
                 .build();
     }
 
+    private NetworkMessage prepareResponse(Object result) {
+        return FACTORY
+                .txCleanupMessageResponse()
+                .result(result)
+                .timestampLong(clockService.nowLong())
+                .build();
+    }
+
     private NetworkMessage prepareErrorResponse(Throwable th) {
         return FACTORY
                 .txCleanupMessageErrorResponse()
                 .throwable(th)
                 .timestampLong(clockService.nowLong())
                 .build();
     }
+
+    /**
+     * Start tracking the cleanup replication process for the provided 
transaction.
+     *
+     * @param txId Transaction id.
+     * @param groups Replication groups.
+     * @param sender Cleanup request sender, needed to send cleanup replicated 
response.
+     */
+    private void trackPartitions(UUID txId, Collection<ReplicationGroupId> 
groups, ClusterNode sender) {
+        Set<TablePartitionId> partitions =
+                groups.stream()
+                        .map(TablePartitionId.class::cast)
+                        .collect(toSet());
+
+        writeIntentsReplicated.put(txId, new CleanupContext(sender, 
partitions, partitions));
+    }
+
+    /**
+     * Process the replication response from a write intent switch request.
+     *
+     * @param response Write intent replication response.
+     */
+    private void processWriteIntentSwitchResponse(ReplicaResponse response) {
+        if (response == null) {
+            return;
+        }
+
+        Object result = response.result();
+
+        if (result instanceof WriteIntentSwitchReplicatedInfo) {
+            writeIntentSwitchReplicated((WriteIntentSwitchReplicatedInfo) 
result);
+        }

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