denis-chudov commented on code in PR #2856:
URL: https://github.com/apache/ignite-3/pull/2856#discussion_r1422217280
##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/replicator/PartitionReplicaListener.java:
##########
@@ -507,7 +508,12 @@ private CompletableFuture<?> processRequest(ReplicaRequest
request, @Nullable Bo
* @param request Tx recovery request.
* @return The future is complete when the transaction state is finalized.
*/
- private CompletableFuture<Void> processTxRecoveryAction(TxRecoveryMessage
request) {
+ private CompletableFuture<Void> processTxRecoveryAction(TxRecoveryMessage
request, String senderId) {
+ // Get node id of the sender to send back cleanup requests.
+ String nodeConsistentId =
transactionStateResolver.consistentId(senderId);
+
+ assert nodeConsistentId != null;
Review Comment:
here we can have assertion errors if the node left topology
##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/replicator/PartitionReplicaListener.java:
##########
@@ -507,7 +508,12 @@ private CompletableFuture<?> processRequest(ReplicaRequest
request, @Nullable Bo
* @param request Tx recovery request.
* @return The future is complete when the transaction state is finalized.
*/
- private CompletableFuture<Void> processTxRecoveryAction(TxRecoveryMessage
request) {
+ private CompletableFuture<Void> processTxRecoveryAction(TxRecoveryMessage
request, String senderId) {
Review Comment:
could you please create a separate method like `private
CompletableFuture<TransactionMeta> triggerTxRecovery(UUID txId)` for this,
because it is needed to trigger the recovery from tx state resolution process.
##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/replicator/TransactionStateResolver.java:
##########
@@ -129,6 +129,18 @@ public void start() {
});
}
+ /**
+ * Get consistent id by node id.
+ *
+ * @param id Node inconsistent id.
+ * @return Node consistent id.
+ */
+ public @Nullable String consistentId(String id) {
Review Comment:
its definitely not a task for tx state resolver, to resolve the node names
by their ids
--
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]