denis-chudov commented on code in PR #3511:
URL: https://github.com/apache/ignite-3/pull/3511#discussion_r1631084161


##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/tx/QueryTransactionContextImpl.java:
##########
@@ -50,13 +58,23 @@ public QueryTransactionContextImpl(
      */
     @Override
     public QueryTransactionWrapper getOrStartImplicit(boolean readOnly) {
+        InternalTransaction transaction;
+        QueryTransactionWrapper result;
+
         if (tx == null) {
-            return new QueryTransactionWrapperImpl(
-                    txManager.begin(observableTimeTracker, readOnly), true
-            );
+            transaction = txManager.begin(observableTimeTracker, readOnly);
+            result = new QueryTransactionWrapperImpl(transaction, true, 
transactionInflights);
+        } else {
+            transaction = tx.unwrap();

Review Comment:
   It is the part of 
`QueryTransactionWrapperSelfTest#testQueryTransactionWrapperTxInflightsInteraction`
 regarding `explicitRwTxCtx`. Actually, the only purpose of both these branches 
is to assign `transaction` and `result` to not duplicate the code below adding 
the inflight.



-- 
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]

Reply via email to