ygerzhedovich commented on code in PR #1232:
URL: https://github.com/apache/ignite-3/pull/1232#discussion_r1003298819
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/SqlQueryProcessor.java:
##########
@@ -387,17 +389,20 @@ private CompletableFuture<AsyncSqlCursor<List<Object>>>
querySingle0(
return nodes.get(0);
})
.thenCompose(sqlNode -> {
+ final boolean rwTx = dataModificationOp(sqlNode);
+
BaseQueryContext ctx = BaseQueryContext.builder()
.frameworkConfig(
Frameworks.newConfigBuilder(FRAMEWORK_CONFIG)
.defaultSchema(schema)
-
.traitDefs(Commons.LOCAL_TRAITS_SET)
+ .traitDefs(rwTx ?
Commons.LOCAL_TRAITS_SET : Commons.DISTRIBUTED_TRAITS_SET)
.build()
)
.logger(LOG)
.cancel(queryCancel)
.parameters(params)
.transaction(outerTx)
+ .transactionTime(rwTx ? null : new
HybridClock().now())
Review Comment:
in case of outer TX we can have different time for few sequented run queries
with the same outer TX
--
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]