You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by kotamrajuyashasvi <ko...@gmail.com> on 2017/08/30 07:20:01 UTC

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/

Re: Ignite sql queries working transactionally

Posted by Evgenii Zhuravlev <e....@gmail.com>.
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 <ko...@gmail.com>:

> 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/
>

Re: Ignite sql queries working transactionally

Posted by kotamrajuyashasvi <ko...@gmail.com>.
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/

Re: Ignite sql queries working transactionally

Posted by ezhuravlev <e....@gmail.com>.
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/