You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "nizhikov (via GitHub)" <gi...@apache.org> on 2026/05/07 15:12:34 UTC
[PR] IGNITE-23383 Doc for transactional aware queries [ignite]
nizhikov opened a new pull request, #13116:
URL: https://github.com/apache/ignite/pull/13116
Thank you for submitting the pull request to the Apache Ignite.
In order to streamline the review of the contribution
we ask you to ensure the following steps have been taken:
### The Contribution Checklist
- [ ] There is a single JIRA ticket related to the pull request.
- [ ] The web-link to the pull request is attached to the JIRA ticket.
- [ ] The JIRA ticket has the _Patch Available_ state.
- [ ] The pull request body describes changes that have been made.
The description explains _WHAT_ and _WHY_ was made instead of _HOW_.
- [ ] The pull request title is treated as the final commit message.
The following pattern must be used: `IGNITE-XXXX Change summary` where `XXXX` - number of JIRA issue.
- [ ] A reviewer has been mentioned through the JIRA comments
(see [the Maintainers list](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute#HowtoContribute-ReviewProcessandMaintainers))
- [ ] The pull request has been checked by the Teamcity Bot and
the `green visa` attached to the JIRA ticket (see tab `PR Check` at [TC.Bot - Instance 1](https://tcbot2.sbt-ignite-dev.ru/prs.html) or [TC.Bot - Instance 2](https://mtcga.gridgain.com/prs.html))
### Notes
- [How to Contribute](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute)
- [Coding abbreviation rules](https://cwiki.apache.org/confluence/display/IGNITE/Abbreviation+Rules)
- [Coding Guidelines](https://cwiki.apache.org/confluence/display/IGNITE/Coding+Guidelines)
- [Apache Ignite Teamcity Bot](https://cwiki.apache.org/confluence/display/IGNITE/Apache+Ignite+Teamcity+Bot)
If you need any help, please email dev@ignite.apache.org or ask anу advice on http://asf.slack.com _#ignite_ channel.
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-23383 Doc for transactional aware queries [ignite]
Posted by "nizhikov (via GitHub)" <gi...@apache.org>.
nizhikov commented on code in PR #13116:
URL: https://github.com/apache/ignite/pull/13116#discussion_r3208698222
##########
docs/_docs/SQL/sql-calcite.adoc:
##########
@@ -483,3 +427,54 @@ Disables certain optimizer rules. This is an optimizer level hint.
----
SELECT /*+ DISABLE_RULE('MergeJoinConverter') */ T1.* FROM TBL1 T1 JOIN TBL2 T2 ON T1.V1=T2.V1 WHERE T2.V2=?
----
+
+== Transactions [[transactions]]
+
+Transactions on `READ_COMMITTED` isolation level are supported for SQL queries in Calcite query engine.
+To ensure backward compatibility transactions support disabled, by default.
+To enable, please, configure like the following:
+
+[tabs]
+--
+tab:XML[]
+[source,xml]
+----
+<bean class="org.apache.ignite.configuration.IgniteConfiguration">
Review Comment:
I'm sure any Ignite user can relect XML config to the java one and vice versa :)
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-23383 Doc for transactional aware queries [ignite]
Posted by "nizhikov (via GitHub)" <gi...@apache.org>.
nizhikov commented on code in PR #13116:
URL: https://github.com/apache/ignite/pull/13116#discussion_r3208600976
##########
docs/_docs/SQL/sql-calcite.adoc:
##########
@@ -483,3 +427,54 @@ Disables certain optimizer rules. This is an optimizer level hint.
----
SELECT /*+ DISABLE_RULE('MergeJoinConverter') */ T1.* FROM TBL1 T1 JOIN TBL2 T2 ON T1.V1=T2.V1 WHERE T2.V2=?
----
+
+== Transactions [[transactions]]
+
+Transactions on `READ_COMMITTED` isolation level are supported for SQL queries in Calcite query engine.
+To ensure backward compatibility transactions support disabled, by default.
+To enable, please, configure like the following:
+
+[tabs]
+--
+tab:XML[]
+[source,xml]
+----
+<bean class="org.apache.ignite.configuration.IgniteConfiguration">
+ <property name="transactionConfiguration">
+ <bean class="org.apache.ignite.configuration.TransactionConfiguration">
+ <property name="txAwareQueriesEnabled" value="true" />
+ ...
+ </bean>
+ </property>
+ ...
+</bean>
+----
+--
+
+The following API "transactional aware":
+
+* key-value API.
+* SQL queries with Calcite engine.
+* Scan queries.
+
+"Transactional aware" means:
+
+1. ACID in the same way as key-value API.
+2. Any data changed or removed by the query will not be visible to the concurrent query until transaction committed.
+3. Any data changed by the query will be returned updated by subsequent queries of the same transaction.
Review Comment:
Please, see example:
```
try (Transaction tx = ignite.transactions.start()) {
cache.put(1, "test");
var res = sql("SELECT _VAL FROM cache WHERE _KEY = 1");
}
```
If `txAwareQueriesEnabled == false' SELECT will return empty result, because, transaction not committed.
But, if `txAwareQueriesEnabled == true' SELECT will return "test" row.
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-23383 Doc for transactional aware queries [ignite]
Posted by "zstan (via GitHub)" <gi...@apache.org>.
zstan commented on code in PR #13116:
URL: https://github.com/apache/ignite/pull/13116#discussion_r3208436416
##########
docs/_docs/SQL/sql-calcite.adoc:
##########
@@ -483,3 +427,54 @@ Disables certain optimizer rules. This is an optimizer level hint.
----
SELECT /*+ DISABLE_RULE('MergeJoinConverter') */ T1.* FROM TBL1 T1 JOIN TBL2 T2 ON T1.V1=T2.V1 WHERE T2.V2=?
----
+
+== Transactions [[transactions]]
+
+Transactions on `READ_COMMITTED` isolation level are supported for SQL queries in Calcite query engine.
+To ensure backward compatibility transactions support disabled, by default.
+To enable, please, configure like the following:
Review Comment:
```suggestion
To ensure backward compatibility, transaction support is disabled by default. To enable it, use the following configuration:
```
##########
docs/_docs/SQL/sql-calcite.adoc:
##########
@@ -483,3 +427,54 @@ Disables certain optimizer rules. This is an optimizer level hint.
----
SELECT /*+ DISABLE_RULE('MergeJoinConverter') */ T1.* FROM TBL1 T1 JOIN TBL2 T2 ON T1.V1=T2.V1 WHERE T2.V2=?
----
+
+== Transactions [[transactions]]
+
+Transactions on `READ_COMMITTED` isolation level are supported for SQL queries in Calcite query engine.
Review Comment:
```suggestion
The Calcite-based query engine supports SQL transactions with READ_COMMITTED isolation.
```
##########
docs/_docs/SQL/sql-calcite.adoc:
##########
@@ -483,3 +427,54 @@ Disables certain optimizer rules. This is an optimizer level hint.
----
SELECT /*+ DISABLE_RULE('MergeJoinConverter') */ T1.* FROM TBL1 T1 JOIN TBL2 T2 ON T1.V1=T2.V1 WHERE T2.V2=?
----
+
+== Transactions [[transactions]]
+
+Transactions on `READ_COMMITTED` isolation level are supported for SQL queries in Calcite query engine.
+To ensure backward compatibility transactions support disabled, by default.
+To enable, please, configure like the following:
+
+[tabs]
+--
+tab:XML[]
+[source,xml]
+----
+<bean class="org.apache.ignite.configuration.IgniteConfiguration">
+ <property name="transactionConfiguration">
+ <bean class="org.apache.ignite.configuration.TransactionConfiguration">
+ <property name="txAwareQueriesEnabled" value="true" />
+ ...
+ </bean>
+ </property>
+ ...
+</bean>
+----
+--
+
+The following API "transactional aware":
+
+* key-value API.
+* SQL queries with Calcite engine.
+* Scan queries.
+
+"Transactional aware" means:
+
+1. ACID in the same way as key-value API.
+2. Any data changed or removed by the query will not be visible to the concurrent query until transaction committed.
+3. Any data changed by the query will be returned updated by subsequent queries of the same transaction.
+4. And data removed by the query will not be returned by subsequent queries of the same transaction.
+
+So, when `txAwareQueriesEnabled = true` you can:
Review Comment:
i\`d prefer not 1-st form, not "you" but smth like: With `txAwareQueriesEnabled = true` become possible ...
Or
Setting txAwareQueriesEnabled = true enables the use of [feature]
##########
docs/_docs/SQL/sql-calcite.adoc:
##########
@@ -483,3 +427,54 @@ Disables certain optimizer rules. This is an optimizer level hint.
----
SELECT /*+ DISABLE_RULE('MergeJoinConverter') */ T1.* FROM TBL1 T1 JOIN TBL2 T2 ON T1.V1=T2.V1 WHERE T2.V2=?
----
+
+== Transactions [[transactions]]
+
+Transactions on `READ_COMMITTED` isolation level are supported for SQL queries in Calcite query engine.
+To ensure backward compatibility transactions support disabled, by default.
+To enable, please, configure like the following:
+
+[tabs]
+--
+tab:XML[]
+[source,xml]
+----
+<bean class="org.apache.ignite.configuration.IgniteConfiguration">
+ <property name="transactionConfiguration">
+ <bean class="org.apache.ignite.configuration.TransactionConfiguration">
+ <property name="txAwareQueriesEnabled" value="true" />
+ ...
+ </bean>
+ </property>
+ ...
+</bean>
+----
+--
+
+The following API "transactional aware":
+
+* key-value API.
+* SQL queries with Calcite engine.
+* Scan queries.
+
+"Transactional aware" means:
+
+1. ACID in the same way as key-value API.
+2. Any data changed or removed by the query will not be visible to the concurrent query until transaction committed.
+3. Any data changed by the query will be returned updated by subsequent queries of the same transaction.
+4. And data removed by the query will not be returned by subsequent queries of the same transaction.
Review Comment:
```suggestion
4. Any data removed by the query will not be returned by subsequent queries of the same transaction.
```
may be :
Data deleted within a transaction will not be returned by subsequent queries in that same transaction.
##########
docs/_docs/SQL/sql-calcite.adoc:
##########
@@ -483,3 +427,54 @@ Disables certain optimizer rules. This is an optimizer level hint.
----
SELECT /*+ DISABLE_RULE('MergeJoinConverter') */ T1.* FROM TBL1 T1 JOIN TBL2 T2 ON T1.V1=T2.V1 WHERE T2.V2=?
----
+
+== Transactions [[transactions]]
+
+Transactions on `READ_COMMITTED` isolation level are supported for SQL queries in Calcite query engine.
+To ensure backward compatibility transactions support disabled, by default.
+To enable, please, configure like the following:
+
+[tabs]
+--
+tab:XML[]
+[source,xml]
+----
+<bean class="org.apache.ignite.configuration.IgniteConfiguration">
+ <property name="transactionConfiguration">
+ <bean class="org.apache.ignite.configuration.TransactionConfiguration">
+ <property name="txAwareQueriesEnabled" value="true" />
+ ...
+ </bean>
+ </property>
+ ...
+</bean>
+----
+--
+
+The following API "transactional aware":
+
+* key-value API.
+* SQL queries with Calcite engine.
+* Scan queries.
+
+"Transactional aware" means:
+
+1. ACID in the same way as key-value API.
+2. Any data changed or removed by the query will not be visible to the concurrent query until transaction committed.
+3. Any data changed by the query will be returned updated by subsequent queries of the same transaction.
+4. And data removed by the query will not be returned by subsequent queries of the same transaction.
+
+So, when `txAwareQueriesEnabled = true` you can:
+
+* Perform INSERT, UPDATE, DELETE statements with regular transaction guarantees.
+* Mix key-value, SQL and Scan queries to process same dataset.
+
+
+[NOTE]
+====
+[discrete]
+=== SELECT ... FOR UPDATE
+Currently, no locks are held by the UPDATE or SELECT statements.
+`SELECT ... FOR UPDATE` statement not supported.
Review Comment:
grammatically - it passed correctly, probably we need to reject this constructions ? issue ? before we will fix it somehow ?
##########
docs/_docs/SQL/sql-calcite.adoc:
##########
@@ -483,3 +427,54 @@ Disables certain optimizer rules. This is an optimizer level hint.
----
SELECT /*+ DISABLE_RULE('MergeJoinConverter') */ T1.* FROM TBL1 T1 JOIN TBL2 T2 ON T1.V1=T2.V1 WHERE T2.V2=?
----
+
+== Transactions [[transactions]]
+
+Transactions on `READ_COMMITTED` isolation level are supported for SQL queries in Calcite query engine.
+To ensure backward compatibility transactions support disabled, by default.
+To enable, please, configure like the following:
+
+[tabs]
+--
+tab:XML[]
+[source,xml]
+----
+<bean class="org.apache.ignite.configuration.IgniteConfiguration">
Review Comment:
what about java code configuration ?
##########
docs/_docs/SQL/sql-calcite.adoc:
##########
@@ -483,3 +427,54 @@ Disables certain optimizer rules. This is an optimizer level hint.
----
SELECT /*+ DISABLE_RULE('MergeJoinConverter') */ T1.* FROM TBL1 T1 JOIN TBL2 T2 ON T1.V1=T2.V1 WHERE T2.V2=?
----
+
+== Transactions [[transactions]]
+
+Transactions on `READ_COMMITTED` isolation level are supported for SQL queries in Calcite query engine.
+To ensure backward compatibility transactions support disabled, by default.
+To enable, please, configure like the following:
+
+[tabs]
+--
+tab:XML[]
+[source,xml]
+----
+<bean class="org.apache.ignite.configuration.IgniteConfiguration">
+ <property name="transactionConfiguration">
+ <bean class="org.apache.ignite.configuration.TransactionConfiguration">
+ <property name="txAwareQueriesEnabled" value="true" />
+ ...
+ </bean>
+ </property>
+ ...
+</bean>
+----
+--
+
+The following API "transactional aware":
+
+* key-value API.
+* SQL queries with Calcite engine.
+* Scan queries.
+
+"Transactional aware" means:
+
+1. ACID in the same way as key-value API.
+2. Any data changed or removed by the query will not be visible to the concurrent query until transaction committed.
Review Comment:
```suggestion
2. Any data modified or deleted within a transaction will not be visible to concurrent transactions until it is committed.
```
##########
docs/_docs/SQL/sql-calcite.adoc:
##########
@@ -483,3 +427,54 @@ Disables certain optimizer rules. This is an optimizer level hint.
----
SELECT /*+ DISABLE_RULE('MergeJoinConverter') */ T1.* FROM TBL1 T1 JOIN TBL2 T2 ON T1.V1=T2.V1 WHERE T2.V2=?
----
+
+== Transactions [[transactions]]
+
+Transactions on `READ_COMMITTED` isolation level are supported for SQL queries in Calcite query engine.
+To ensure backward compatibility transactions support disabled, by default.
+To enable, please, configure like the following:
+
+[tabs]
+--
+tab:XML[]
+[source,xml]
+----
+<bean class="org.apache.ignite.configuration.IgniteConfiguration">
+ <property name="transactionConfiguration">
+ <bean class="org.apache.ignite.configuration.TransactionConfiguration">
+ <property name="txAwareQueriesEnabled" value="true" />
+ ...
+ </bean>
+ </property>
+ ...
+</bean>
+----
+--
+
+The following API "transactional aware":
+
+* key-value API.
+* SQL queries with Calcite engine.
+* Scan queries.
+
+"Transactional aware" means:
+
+1. ACID in the same way as key-value API.
+2. Any data changed or removed by the query will not be visible to the concurrent query until transaction committed.
+3. Any data changed by the query will be returned updated by subsequent queries of the same transaction.
Review Comment:
don`t understand at all (
##########
docs/_docs/SQL/sql-calcite.adoc:
##########
@@ -483,3 +427,54 @@ Disables certain optimizer rules. This is an optimizer level hint.
----
SELECT /*+ DISABLE_RULE('MergeJoinConverter') */ T1.* FROM TBL1 T1 JOIN TBL2 T2 ON T1.V1=T2.V1 WHERE T2.V2=?
----
+
+== Transactions [[transactions]]
+
+Transactions on `READ_COMMITTED` isolation level are supported for SQL queries in Calcite query engine.
Review Comment:
PESSIMISTIC, READ_COMMITTED !! Not Optimistic
I think it also need to be mention that some kind of Frankenstein is currently implemented, i.e :
```
try (Transaction tx = client.transactions().txStart(PESSIMISTIC, READ_COMMITTED)) {
sql("some SQL ...
```
and not like:
```
BEGIN TRANSACTION;
UPDATE accounts SET balance = balance - 500 WHERE id = 1;
UPDATE accounts SET balance = balance + 500 WHERE id = 2;
COMMIT;
```
##########
docs/_docs/SQL/sql-calcite.adoc:
##########
@@ -483,3 +427,54 @@ Disables certain optimizer rules. This is an optimizer level hint.
----
SELECT /*+ DISABLE_RULE('MergeJoinConverter') */ T1.* FROM TBL1 T1 JOIN TBL2 T2 ON T1.V1=T2.V1 WHERE T2.V2=?
----
+
+== Transactions [[transactions]]
+
+Transactions on `READ_COMMITTED` isolation level are supported for SQL queries in Calcite query engine.
+To ensure backward compatibility transactions support disabled, by default.
+To enable, please, configure like the following:
+
+[tabs]
+--
+tab:XML[]
+[source,xml]
+----
+<bean class="org.apache.ignite.configuration.IgniteConfiguration">
+ <property name="transactionConfiguration">
+ <bean class="org.apache.ignite.configuration.TransactionConfiguration">
+ <property name="txAwareQueriesEnabled" value="true" />
+ ...
+ </bean>
+ </property>
+ ...
+</bean>
+----
+--
+
+The following API "transactional aware":
+
+* key-value API.
+* SQL queries with Calcite engine.
+* Scan queries.
+
+"Transactional aware" means:
+
+1. ACID in the same way as key-value API.
+2. Any data changed or removed by the query will not be visible to the concurrent query until transaction committed.
+3. Any data changed by the query will be returned updated by subsequent queries of the same transaction.
+4. And data removed by the query will not be returned by subsequent queries of the same transaction.
+
+So, when `txAwareQueriesEnabled = true` you can:
+
+* Perform INSERT, UPDATE, DELETE statements with regular transaction guarantees.
+* Mix key-value, SQL and Scan queries to process same dataset.
+
+
+[NOTE]
+====
+[discrete]
+=== SELECT ... FOR UPDATE
+Currently, no locks are held by the UPDATE or SELECT statements.
+`SELECT ... FOR UPDATE` statement not supported.
+This mean, lost update are possible with transactional SQL queries in case several transactions modifies one key concurrently.
Review Comment:
This means lost updates can occur when multiple transactions concurrently modify the same key.
##########
docs/_docs/SQL/sql-calcite.adoc:
##########
@@ -483,3 +427,54 @@ Disables certain optimizer rules. This is an optimizer level hint.
----
SELECT /*+ DISABLE_RULE('MergeJoinConverter') */ T1.* FROM TBL1 T1 JOIN TBL2 T2 ON T1.V1=T2.V1 WHERE T2.V2=?
----
+
+== Transactions [[transactions]]
+
+Transactions on `READ_COMMITTED` isolation level are supported for SQL queries in Calcite query engine.
+To ensure backward compatibility transactions support disabled, by default.
+To enable, please, configure like the following:
+
+[tabs]
+--
+tab:XML[]
+[source,xml]
+----
+<bean class="org.apache.ignite.configuration.IgniteConfiguration">
+ <property name="transactionConfiguration">
+ <bean class="org.apache.ignite.configuration.TransactionConfiguration">
+ <property name="txAwareQueriesEnabled" value="true" />
+ ...
+ </bean>
+ </property>
+ ...
+</bean>
+----
+--
+
+The following API "transactional aware":
+
+* key-value API.
+* SQL queries with Calcite engine.
+* Scan queries.
+
+"Transactional aware" means:
+
+1. ACID in the same way as key-value API.
+2. Any data changed or removed by the query will not be visible to the concurrent query until transaction committed.
+3. Any data changed by the query will be returned updated by subsequent queries of the same transaction.
+4. And data removed by the query will not be returned by subsequent queries of the same transaction.
+
+So, when `txAwareQueriesEnabled = true` you can:
+
+* Perform INSERT, UPDATE, DELETE statements with regular transaction guarantees.
+* Mix key-value, SQL and Scan queries to process same dataset.
+
+
+[NOTE]
+====
+[discrete]
+=== SELECT ... FOR UPDATE
+Currently, no locks are held by the UPDATE or SELECT statements.
+`SELECT ... FOR UPDATE` statement not supported.
+This mean, lost update are possible with transactional SQL queries in case several transactions modifies one key concurrently.
Review Comment:
update**s** are ot update **is**
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-23383 Doc for transactional aware queries [ignite]
Posted by "nizhikov (via GitHub)" <gi...@apache.org>.
nizhikov merged PR #13116:
URL: https://github.com/apache/ignite/pull/13116
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-23383 Doc for transactional aware queries [ignite]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #13116:
URL: https://github.com/apache/ignite/pull/13116#issuecomment-4407112937
## [](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=13116) **Quality Gate passed**
Issues
 [0 New issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=13116&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=13116&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_ignite&pullRequest=13116&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=13116&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=13116&metric=new_duplicated_lines_density&view=list)
<!-- sqra-placement-anchor -->
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=13116)
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-23383 Doc for transactional aware queries [ignite]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #13116:
URL: https://github.com/apache/ignite/pull/13116#issuecomment-4406639641
## [](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=13116) **Quality Gate passed**
Issues
 [0 New issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=13116&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=13116&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_ignite&pullRequest=13116&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=13116&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=13116&metric=new_duplicated_lines_density&view=list)
<!-- sqra-placement-anchor -->
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=13116)
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-23383 Doc for transactional aware queries [ignite]
Posted by "zstan (via GitHub)" <gi...@apache.org>.
zstan commented on code in PR #13116:
URL: https://github.com/apache/ignite/pull/13116#discussion_r3208659979
##########
docs/_docs/SQL/sql-calcite.adoc:
##########
@@ -483,3 +427,54 @@ Disables certain optimizer rules. This is an optimizer level hint.
----
SELECT /*+ DISABLE_RULE('MergeJoinConverter') */ T1.* FROM TBL1 T1 JOIN TBL2 T2 ON T1.V1=T2.V1 WHERE T2.V2=?
----
+
+== Transactions [[transactions]]
+
+Transactions on `READ_COMMITTED` isolation level are supported for SQL queries in Calcite query engine.
+To ensure backward compatibility transactions support disabled, by default.
+To enable, please, configure like the following:
+
+[tabs]
+--
+tab:XML[]
+[source,xml]
+----
+<bean class="org.apache.ignite.configuration.IgniteConfiguration">
+ <property name="transactionConfiguration">
+ <bean class="org.apache.ignite.configuration.TransactionConfiguration">
+ <property name="txAwareQueriesEnabled" value="true" />
+ ...
+ </bean>
+ </property>
+ ...
+</bean>
+----
+--
+
+The following API "transactional aware":
+
+* key-value API.
+* SQL queries with Calcite engine.
+* Scan queries.
+
+"Transactional aware" means:
+
+1. ACID in the same way as key-value API.
+2. Any data changed or removed by the query will not be visible to the concurrent query until transaction committed.
+3. Any data changed by the query will be returned updated by subsequent queries of the same transaction.
Review Comment:
I mean: it`s not human readable )))
do you agree to change like :
Data modified by a query will be returned with updated values by subsequent queries within the same 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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-23383 Doc for transactional aware queries [ignite]
Posted by "zstan (via GitHub)" <gi...@apache.org>.
zstan commented on code in PR #13116:
URL: https://github.com/apache/ignite/pull/13116#discussion_r3208490543
##########
docs/_docs/SQL/sql-calcite.adoc:
##########
@@ -483,3 +427,54 @@ Disables certain optimizer rules. This is an optimizer level hint.
----
SELECT /*+ DISABLE_RULE('MergeJoinConverter') */ T1.* FROM TBL1 T1 JOIN TBL2 T2 ON T1.V1=T2.V1 WHERE T2.V2=?
----
+
+== Transactions [[transactions]]
+
+Transactions on `READ_COMMITTED` isolation level are supported for SQL queries in Calcite query engine.
+To ensure backward compatibility transactions support disabled, by default.
+To enable, please, configure like the following:
+
+[tabs]
+--
+tab:XML[]
+[source,xml]
+----
+<bean class="org.apache.ignite.configuration.IgniteConfiguration">
+ <property name="transactionConfiguration">
+ <bean class="org.apache.ignite.configuration.TransactionConfiguration">
+ <property name="txAwareQueriesEnabled" value="true" />
+ ...
+ </bean>
+ </property>
+ ...
+</bean>
+----
+--
+
+The following API "transactional aware":
+
+* key-value API.
+* SQL queries with Calcite engine.
+* Scan queries.
+
+"Transactional aware" means:
+
+1. ACID in the same way as key-value API.
+2. Any data changed or removed by the query will not be visible to the concurrent query until transaction committed.
+3. Any data changed by the query will be returned updated by subsequent queries of the same transaction.
+4. And data removed by the query will not be returned by subsequent queries of the same transaction.
+
+So, when `txAwareQueriesEnabled = true` you can:
+
+* Perform INSERT, UPDATE, DELETE statements with regular transaction guarantees.
+* Mix key-value, SQL and Scan queries to process same dataset.
+
+
+[NOTE]
+====
+[discrete]
+=== SELECT ... FOR UPDATE
+Currently, no locks are held by the UPDATE or SELECT statements.
+`SELECT ... FOR UPDATE` statement not supported.
Review Comment:
Let`s describe syntax like :
`update t set val = val + 1 WHERE id = 1`
what does it means : Currently, no locks are held by the UPDATE or SELECT
lets mean:
For example, if you execute a query like `SET salary = salary + 50 WHERE id = 1` concurrently across multiple threads, note that due to the lost-update anomaly, the final value may not equal the original salary plus 50 multiplied by the number of threads.
or
When running UPDATE ... SET salary = salary + 50 WHERE id = 1concurrently from multiple threads, be aware that the lost-update anomaly may cause the final value to differ frominitial_salary + (50 × thread_count).
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-23383 Doc for transactional aware queries [ignite]
Posted by "zstan (via GitHub)" <gi...@apache.org>.
zstan commented on code in PR #13116:
URL: https://github.com/apache/ignite/pull/13116#discussion_r3208490543
##########
docs/_docs/SQL/sql-calcite.adoc:
##########
@@ -483,3 +427,54 @@ Disables certain optimizer rules. This is an optimizer level hint.
----
SELECT /*+ DISABLE_RULE('MergeJoinConverter') */ T1.* FROM TBL1 T1 JOIN TBL2 T2 ON T1.V1=T2.V1 WHERE T2.V2=?
----
+
+== Transactions [[transactions]]
+
+Transactions on `READ_COMMITTED` isolation level are supported for SQL queries in Calcite query engine.
+To ensure backward compatibility transactions support disabled, by default.
+To enable, please, configure like the following:
+
+[tabs]
+--
+tab:XML[]
+[source,xml]
+----
+<bean class="org.apache.ignite.configuration.IgniteConfiguration">
+ <property name="transactionConfiguration">
+ <bean class="org.apache.ignite.configuration.TransactionConfiguration">
+ <property name="txAwareQueriesEnabled" value="true" />
+ ...
+ </bean>
+ </property>
+ ...
+</bean>
+----
+--
+
+The following API "transactional aware":
+
+* key-value API.
+* SQL queries with Calcite engine.
+* Scan queries.
+
+"Transactional aware" means:
+
+1. ACID in the same way as key-value API.
+2. Any data changed or removed by the query will not be visible to the concurrent query until transaction committed.
+3. Any data changed by the query will be returned updated by subsequent queries of the same transaction.
+4. And data removed by the query will not be returned by subsequent queries of the same transaction.
+
+So, when `txAwareQueriesEnabled = true` you can:
+
+* Perform INSERT, UPDATE, DELETE statements with regular transaction guarantees.
+* Mix key-value, SQL and Scan queries to process same dataset.
+
+
+[NOTE]
+====
+[discrete]
+=== SELECT ... FOR UPDATE
+Currently, no locks are held by the UPDATE or SELECT statements.
+`SELECT ... FOR UPDATE` statement not supported.
Review Comment:
Let`s describe syntax like :
`update t set val = val + 1 WHERE id = 1`
what does it means : Currently, no locks are held by the UPDATE or SELECT
lets mean:
For example, if you execute a query like `SET salary = salary + 50 WHERE id = 1` concurrently across multiple threads, note that due to the lost-update anomaly, the final value may not equal the original salary plus 50 multiplied by the number of threads.
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-23383 Doc for transactional aware queries [ignite]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #13116:
URL: https://github.com/apache/ignite/pull/13116#issuecomment-4398425323
## [](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=13116) **Quality Gate passed**
Issues
 [0 New issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=13116&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=13116&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_ignite&pullRequest=13116&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=13116&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=13116&metric=new_duplicated_lines_density&view=list)
<!-- sqra-placement-anchor -->
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=13116)
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-23383 Doc for transactional aware queries [ignite]
Posted by "zstan (via GitHub)" <gi...@apache.org>.
zstan commented on code in PR #13116:
URL: https://github.com/apache/ignite/pull/13116#discussion_r3209268688
##########
docs/_docs/SQL/sql-calcite.adoc:
##########
@@ -483,3 +427,54 @@ Disables certain optimizer rules. This is an optimizer level hint.
----
SELECT /*+ DISABLE_RULE('MergeJoinConverter') */ T1.* FROM TBL1 T1 JOIN TBL2 T2 ON T1.V1=T2.V1 WHERE T2.V2=?
----
+
+== Transactions [[transactions]]
+
+Transactions on `READ_COMMITTED` isolation level are supported for SQL queries in Calcite query engine.
+To ensure backward compatibility transactions support disabled, by default.
+To enable, please, configure like the following:
+
+[tabs]
+--
+tab:XML[]
+[source,xml]
+----
+<bean class="org.apache.ignite.configuration.IgniteConfiguration">
Review Comment:
it`s just about friendy UI ... and addressd to newbie guys too
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-23383 Doc for transactional aware queries [ignite]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #13116:
URL: https://github.com/apache/ignite/pull/13116#issuecomment-4407434355
## [](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=13116) **Quality Gate passed**
Issues
 [0 New issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=13116&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=13116&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_ignite&pullRequest=13116&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=13116&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=13116&metric=new_duplicated_lines_density&view=list)
<!-- sqra-placement-anchor -->
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=13116)
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org