ygerzhedovich commented on code in PR #1232:
URL: https://github.com/apache/ignite-3/pull/1232#discussion_r1003413392
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/SqlQueryProcessor.java:
##########
@@ -387,17 +389,21 @@ 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)
+ // use new implementation after ignite-17260
+ .transactionTime(/*outerTx != null ?
outerTx.timeStamp() : */new HybridClock().now())
Review Comment:
you shouldn't take timestamps for internal RW transaction
--
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]