xtern commented on code in PR #1501:
URL: https://github.com/apache/ignite-3/pull/1501#discussion_r1092869572
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/SqlQueryProcessor.java:
##########
@@ -425,17 +423,17 @@ private CompletableFuture<AsyncSqlCursor<List<Object>>>
querySingle0(
boolean implicitTxRequired = outerTx == null
&& rwOp;
- InternalTransaction implicitTx =
implicitTxRequired ? txManager.begin() : null;
+ InternalTransaction tx = implicitTxRequired ?
txManager.begin()
+ : outerTx != null ? outerTx : new
TransferredTxAttributesHolder(UUID.randomUUID(), clock.now());
Review Comment:
No, it will not fail distributed operations, because for read-only tx only
timestamp matters.
see
https://github.com/apache/ignite-3/blob/main/modules/table/src/main/java/org/apache/ignite/internal/table/distributed/storage/InternalTableImpl.java#L884
The reason why I added random UUID here - because it seems to me better then
passing `null` (since the real transaction must always have ID).
But may be you right, since in future this class will not implement
transaction it can not have ID at all.
--
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]