denis-chudov commented on code in PR #7649:
URL: https://github.com/apache/ignite-3/pull/7649#discussion_r2853916145
##########
modules/transactions/src/main/java/org/apache/ignite/internal/tx/impl/FinishedTransactionBatchRequestHandler.java:
##########
@@ -74,6 +80,8 @@ private void
processFinishedTransactionsBatchMessage(FinishedTransactionsBatchMe
}
private void cleanUpForTransaction(UUID transactionId) {
+ transactionInflights.markReadOnlyTxFinished(transactionId);
Review Comment:
Does it really work?
`markReadOnlyTxFinished` creates new ReadOnlyTxContext if there no context,
and marks it as finished. Then, FinishedReadOnlyTransactionTracker scans
finished transactions (see
`FinishedReadOnlyTransactionTracker#broadcastClosedTransactions`,
`TransactionInflights#finishedReadOnlyTransactions` ) and finds this context,
marked as finished. It broadcasts new `FinishedTransactionsBatchMessage` and
creates the contexts for this transactions on all nodes again.
I think, on message processing it shouldn't be created, and the check in the
test should be fixed to make sure the context is removed
##########
modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/client/ItThinClientSqlTest.java:
##########
@@ -858,7 +857,10 @@ public void testBroadcastQueryTxInflightStateCleanup() {
IgniteImpl server = TestWrappers.unwrapIgniteImpl(server(i));
TxManager txManager = server.txManager();
TransactionInflights transactionInflights =
IgniteTestUtils.getFieldValue(txManager, "transactionInflights");
- assertFalse(transactionInflights.hasActiveInflights(), "Expecting
no active inflights");
+
+ Awaitility.await()
+ .atMost(Duration.ofSeconds(60))
Review Comment:
You may reduce this time by running the test with small value of
`RESOURCE_VACUUM_INTERVAL_MILLISECONDS_PROPERTY` (see usages of
`@WithSystemProperty`)
--
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]