IGNITE-26567 RO scans triggered by SQL query fragments cause memory leaks in inflights tracker#7649
IGNITE-26567 RO scans triggered by SQL query fragments cause memory leaks in inflights tracker#7649Lalant wants to merge 3 commits intoapache:mainfrom
Conversation
…BatchRequestHandler in order to fix issue with tx finish status on nodes different from coordinator.
| assertFalse(transactionInflights.hasActiveInflights(), "Expecting no active inflights"); | ||
|
|
||
| Awaitility.await() | ||
| .atMost(Duration.ofSeconds(60)) |
There was a problem hiding this comment.
You may reduce this time by running the test with small value of RESOURCE_VACUUM_INTERVAL_MILLISECONDS_PROPERTY (see usages of @WithSystemProperty)
| } | ||
|
|
||
| private void cleanUpForTransaction(UUID transactionId) { | ||
| transactionInflights.markReadOnlyTxFinished(transactionId); |
There was a problem hiding this 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
There was a problem hiding this comment.
I've updated the test to check that contexts are empty
70d1dad to
cd4a8e4
Compare
cd4a8e4 to
ed635b0
Compare
testBroadcastQueryTxInflightStateCleanup has never finished. Added markReadOnlyTxFinished call to FinishedTransactionBatchRequestHandler in order to fix issue on nodes different from coordinator.
https://issues.apache.org/jira/projects/IGNITE/issues/IGNITE-26567