ygerzhedovich commented on code in PR #1232:
URL: https://github.com/apache/ignite-3/pull/1232#discussion_r1006450629
##########
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 ? (outerTx != null ?
outerTx.readTimestamp() : new HybridClock().now()) : null)
Review Comment:
I mean the following case:
1) we have an outer RW transaction
2) user do SELECT, so rwTx = false
3) you will set transaction time as not null
--
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]