alievmirza commented on code in PR #6099: URL: https://github.com/apache/ignite-3/pull/6099#discussion_r2176092060
########## modules/partition-replicator/src/main/java/org/apache/ignite/internal/partition/replicator/handlers/TxCleanupRecoveryRequestHandler.java: ########## @@ -115,5 +110,47 @@ private void runPersistentStorageScan() { } LOG.debug("Persistent storage scan finished [committed={}, aborted={}].", committedCount, abortedCount); + + if (!tasks.isEmpty()) { + throttledCleanup(new CopyOnWriteArrayList<>(tasks)); Review Comment: Why do we need CopyOnWriteArrayList here? ########## modules/transactions/src/main/java/org/apache/ignite/internal/tx/impl/TxCleanupRequestHandler.java: ########## @@ -118,10 +118,9 @@ public TxCleanupRequestHandler( public void start() { messagingService.addMessageHandler( TxMessageGroup.class, - message -> cleanupExecutor, (msg, sender, correlationId) -> { if (msg instanceof TxCleanupMessage) { - processTxCleanup((TxCleanupMessage) msg, sender, correlationId); + cleanupExecutor.execute(() -> processTxCleanup((TxCleanupMessage) msg, sender, correlationId)); Review Comment: Why do we need this change? ########## modules/partition-replicator/src/main/java/org/apache/ignite/internal/partition/replicator/handlers/TxCleanupRecoveryRequestHandler.java: ########## @@ -94,17 +99,7 @@ private void runPersistentStorageScan() { abortedCount++; } - txManager.cleanup( - replicationGroupId, - txMeta.enlistedPartitions(), - txMeta.txState() == COMMITTED, - txMeta.commitTimestamp(), - txId - ).exceptionally(throwable -> { - LOG.warn("Failed to cleanup transaction [txId={}].", throwable, txId); - - return null; - }); + tasks.add(tx); Review Comment: With this approach, we lost the logic that calls ``` failureProcessor.process(new FailureContext(e, errorMessage)); ``` when `IgniteInternalException e` is thrown during `txManager.cleanup` process. Let's try to preserve previous behaviour -- 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