korlov42 commented on code in PR #6611:
URL: https://github.com/apache/ignite-3/pull/6611#discussion_r2391513145
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/InflightTransactionalOperationTracker.java:
##########
@@ -37,21 +37,13 @@ class InflightTransactionalOperationTracker implements
TransactionalOperationTra
@Override
public void registerOperationStart(InternalTransaction tx) {
- if (shouldBeTracked(tx)) {
- if (!delegate.addInflight(tx.id(), tx.isReadOnly())) {
- throw new TransactionException(TX_ALREADY_FINISHED_ERR,
format("Transaction is already finished [tx={}]", tx));
- }
+ if (!tx.isReadOnly() && !delegate.track(tx.id())) {
+ throw new TransactionException(TX_ALREADY_FINISHED_ERR,
format("Transaction is already finished [tx={}]", tx));
}
}
@Override
public void registerOperationFinish(InternalTransaction tx) {
Review Comment:
as per @denis-chudov comment,
```
The reason of adding the inflights to RO txns is to have the correct cleanup
```
`InflightTransactionalOperationTracker` is the only place where you can
reliably track inflight during distributed SQL operation on a proper node (that
is, on the node-coordinator of related transaction). Does this patch brings any
changes to clean up protocol, so it safe to not to track inflight for RO
transactions now?
--
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]