Ignite sql queries working transactionally

classic Classic list List threaded Threaded
6 messages Options
kotamrajuyashasvi kotamrajuyashasvi
Reply | Threaded
Open this post in threaded view
|

Ignite sql queries working transactionally

Hi

In my ignite client application I need to perform a set of update/delete sql
query operations transactionally. I observed  that by using ignite
transactions I was able to achieve this. When ever an update or delete query
is executed with in a transaction, it is locking all resulting rows and thus
preventing other clients modify/delete the same rows using update/delete
queries. I checked this in the following way.

First I started an Ignite client and started a Transaction. Then I executed
an update query acting up on some rows. Then I made this client to sleep for
some seconds before committing the transaction. Now I immediately started
another client and tried executing a delete query which would act upon the
same or few of the rows as the update query in first client. Now I could
observe that the second client waits till the first client commits and only
then it executes its delete query.

Rollback functionality is also working on update/delete queries. So does it
mean that ignite now supports fully transactional sql queries? It was
mentioned in many previous ignite users posts that ignite sql queries are
not transactional and also in 2.1 docs its mentioned that '*At SQL level
Ignite supports atomic, but not yet transactional consistency. Ignite
community plans to implement SQL transactions in version 2.2*.'. What does
it mean?  Also no where in docs mentions about using sql queries in
transactions.

can I use ignite jdbc thin client with sql queries and transactions?

I am using ignite version 2.1





--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
ezhuravlev ezhuravlev
Reply | Threaded
Open this post in threaded view
|

Re: Ignite sql queries working transactionally

Hi,

Currently, Sql is not transactional, support of transactions in SQL should
be added in 2.2 release(or it could be added in 2.3 release, if version 2.2
will be  released for some hot fixes, it currently descussing on dev list).

It's not recommended to use SQL in Transactions, most possible that in the
next release exception will be thrown in the case using SQL inside
transactions. Here is a ticket for it:
https://issues.apache.org/jira/browse/IGNITE-6044

Evgenii



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
kotamrajuyashasvi kotamrajuyashasvi
Reply | Threaded
Open this post in threaded view
|

Re: Ignite sql queries working transactionally

Hi

Thanks for the response

I still do not understand the difference between using sql queries in ignite
Transaction and sql transactions feature that is being mentioned which would
be added in upcoming releases.

If in future releases, using sql queries in Transactions throws exception,
How am I suppose to execute group of DML queries transactionally i.e in one
single transaction, should be able to commit or rollback.

Are you saying that there would be another separate Transaction feature that
would be added in future which would be exclusively used for queries?





--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
ezhuravlev ezhuravlev
Reply | Threaded
Open this post in threaded view
|

Re: Ignite sql queries working transactionally

In the nearest release should be fixed https://issues.apache.org/jira/browse/IGNITE-6044
and in the subsequent release will be added support for transactional SQl.
 

2017-08-30 12:36 GMT+03:00 kotamrajuyashasvi <[hidden email]>:
Hi

Thanks for the response

I still do not understand the difference between using sql queries in ignite
Transaction and sql transactions feature that is being mentioned which would
be added in upcoming releases.

If in future releases, using sql queries in Transactions throws exception,
How am I suppose to execute group of DML queries transactionally i.e in one
single transaction, should be able to commit or rollback.

Are you saying that there would be another separate Transaction feature that
would be added in future which would be exclusively used for queries?

dmagda dmagda
Reply | Threaded
Open this post in threaded view
|

Re: Ignite sql queries working transactionally

In reply to this post by kotamrajuyashasvi
Hi,

The docs are still valid - SQL operations are not fully transactional yet and, according, to JIRA the works is in progress to make this happen:

Denis
 
On Aug 30, 2017, at 12:21 AM, kotamrajuyashasvi <[hidden email]> wrote:

Hi

In my ignite client application I need to perform a set of update/delete sql
query operations transactionally. I observed  that by using ignite
transactions I was able to achieve this. When ever an update or delete query
is executed with in a transaction, it is locking all resulting rows and thus
preventing other clients modify/delete the same rows using update/delete
queries. I checked this in the following way.

First I started an Ignite client and started a Transaction. Then I executed
an update query acting up on some rows. Then I made this client to sleep for
some seconds before committing the transaction. Now I immediately started
another client and tried executing a delete query which would act upon the
same or few of the rows as the update query in first client. Now I could
observe that the second client waits till the first client commits and only
then it executes its delete query.

Rollback functionality is also working on update/delete queries. So does it
mean that ignite now supports fully transactional sql queries? It was
mentioned in many previous ignite users posts that ignite sql queries are
not transactional and also in 2.1 docs its mentioned that '*At SQL level
Ignite supports atomic, but not yet transactional consistency. Ignite
community plans to implement SQL transactions in version 2.2*.'. What does
it mean?  Also no where in docs mentions about using sql queries in
transactions.

can I use ignite jdbc thin client with sql queries and transactions?

I am using ignite version 2.1





--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

dsetrakyan dsetrakyan
Reply | Threaded
Open this post in threaded view
|

Re: Ignite sql queries working transactionally

Denis, I think you provided an incorrect link to the ticket. Here is the correct link:


D.

On Wed, Aug 30, 2017 at 5:50 PM, Denis Magda <[hidden email]> wrote:
Hi,

The docs are still valid - SQL operations are not fully transactional yet and, according, to JIRA the works is in progress to make this happen:

Denis
 
On Aug 30, 2017, at 12:21 AM, kotamrajuyashasvi <[hidden email]> wrote:

Hi

In my ignite client application I need to perform a set of update/delete sql
query operations transactionally. I observed  that by using ignite
transactions I was able to achieve this. When ever an update or delete query
is executed with in a transaction, it is locking all resulting rows and thus
preventing other clients modify/delete the same rows using update/delete
queries. I checked this in the following way.

First I started an Ignite client and started a Transaction. Then I executed
an update query acting up on some rows. Then I made this client to sleep for
some seconds before committing the transaction. Now I immediately started
another client and tried executing a delete query which would act upon the
same or few of the rows as the update query in first client. Now I could
observe that the second client waits till the first client commits and only
then it executes its delete query.

Rollback functionality is also working on update/delete queries. So does it
mean that ignite now supports fully transactional sql queries? It was
mentioned in many previous ignite users posts that ignite sql queries are
not transactional and also in 2.1 docs its mentioned that '*At SQL level
Ignite supports atomic, but not yet transactional consistency. Ignite
community plans to implement SQL transactions in version 2.2*.'. What does
it mean?  Also no where in docs mentions about using sql queries in
transactions.

can I use ignite jdbc thin client with sql queries and transactions?

I am using ignite version 2.1





--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/