You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by UCDeveloper <us...@majesco.com> on 2016/09/10 09:39:09 UTC
Query does not include objects added into Cache from within a
transaction
Hi,
I am using ignite cache in transactional mode. When I do a query on the
cache from within the transaction, the query results do not include the
objects put into the cache from within the transaction, even though the
query is fired from within the same transaction. The objects appear in the
query results only after the transaction is committed. Is there any way I
can get Ignite to include the uncommitted objects of the same transaction in
the query results ? I need to use the cache in transactional mode so that if
there are any issues I can rollback and bring the cache to the original
state before the transaction.
Thanks
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Query-does-not-include-objects-added-into-Cache-from-within-a-transaction-tp7651.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Query does not include objects added into Cache from within a
transaction
Posted by vkulichenko <va...@gmail.com>.
This means that if you execute a query in the middle of commit, you can see
partial results. E.g., there is a transaction which updates 10 entries, it
already committed 5 of them and is about to commit other 5. A query at this
moment of time will already see committed entries.
-Val
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Query-does-not-include-objects-added-into-Cache-from-within-a-transaction-tp7651p7752.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Query does not include objects added into Cache from within a
transaction
Posted by akaptsan <ak...@mail.ru>.
JIRA wrote
> concurrent SQL query can see partially committed transaction
I thought the problem is SQL doesn't see uncommited changes at all (even
from my thread). But this means SQL can see some part of uncommited
transaction? How it is possible?
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Query-does-not-include-objects-added-into-Cache-from-within-a-transaction-tp7651p7747.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Query does not include objects added into Cache from within a transaction
Posted by Nikolai Tikhonov <nt...@apache.org>.
Hi,
I'm not sure that exist workaround without additional efforts.
BTW it's correct link on this ticket
https://issues.apache.org/jira/browse/IGNITE-3478
On Tue, Sep 13, 2016 at 9:43 PM, vkulichenko <va...@gmail.com>
wrote:
> If you're executing a query from the same transaction where you updated the
> data, I'm pretty sure you can find a workaround, because you know
> everything
> about the updates made within the transaction. Transactional SQL feature is
> mostly designed to avoid dirty reads in case a query transaction and update
> transaction are two separate concurrent transactions.
>
> -Val
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/Query-does-not-include-objects-
> added-into-Cache-from-within-a-transaction-tp7651p7717.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>
Re: Query does not include objects added into Cache from within a
transaction
Posted by akaptsan <ak...@mail.ru>.
Yes in theory I could know all changes I made. But in practice it will make
application logic so much more complicated!
E.g in one part of transaction I create an object and in some other part
execute query which should include this object in result cursor taking into
account WHERE and ORDER BY. Due to this problem I need to merge somehow the
created object into the cursor considering WHERE and ORDER BY. Not easy
task.
I'm thinking how to port our application from Oracle to Ignition. This kind
of fundamental difference in transaction behaviour makes the task very
difficult: we'll need to redesign huge amount of application code.
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Query-does-not-include-objects-added-into-Cache-from-within-a-transaction-tp7651p7723.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Query does not include objects added into Cache from within a
transaction
Posted by vkulichenko <va...@gmail.com>.
If you're executing a query from the same transaction where you updated the
data, I'm pretty sure you can find a workaround, because you know everything
about the updates made within the transaction. Transactional SQL feature is
mostly designed to avoid dirty reads in case a query transaction and update
transaction are two separate concurrent transactions.
-Val
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Query-does-not-include-objects-added-into-Cache-from-within-a-transaction-tp7651p7717.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Query does not include objects added into Cache from within a transaction
Posted by Denis Magda <dm...@gridgain.com>.
It depends on when someone from the community takes over this task getting it done. If to refer to previous discussion we should expect the feature appear in Ignite in the beginning of the next year.
—
Denis
> On Sep 13, 2016, at 3:15 AM, akaptsan <ak...@mail.ru> wrote:
>
> I would say it's critical problem. Can you estimate when it will be fixed?
> (I don't have access to jira)
>
>
>
> --
> View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Query-does-not-include-objects-added-into-Cache-from-within-a-transaction-tp7651p7703.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Query does not include objects added into Cache from within a
transaction
Posted by akaptsan <ak...@mail.ru>.
I would say it's critical problem. Can you estimate when it will be fixed?
(I don't have access to jira)
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Query-does-not-include-objects-added-into-Cache-from-within-a-transaction-tp7651p7703.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Query does not include objects added into Cache from within a
transaction
Posted by vkulichenko <va...@gmail.com>.
Andrey,
This was just a wrong link. Nikolay already provided the correct one above:
https://issues.apache.org/jira/browse/IGNITE-3478
-Val
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Query-does-not-include-objects-added-into-Cache-from-within-a-transaction-tp7651p7811.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Query does not include objects added into Cache from within a
transaction
Posted by Andrey Kornev <an...@hotmail.com>.
Val,
I'm unable to login to the that bug tracking system. Is it private to GridGain? Is there a clone of this ticket in Apache JIRA?
Regards
Andrey
________________________________
From: vkulichenko <va...@gmail.com>
Sent: Monday, September 12, 2016 7:57 PM
To: user@ignite.apache.org
Subject: Re: Query does not include objects added into Cache from within a transaction
Hi,
SQL queries are currently not transactional. There is a ticket for this
improvement: https://ggsystems.atlassian.net/browse/IGN-4666
-Val
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Query-does-not-include-objects-added-into-Cache-from-within-a-transaction-tp7651p7688.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Query does not include objects added into Cache from within a
transaction
Posted by vkulichenko <va...@gmail.com>.
Hi,
SQL queries are currently not transactional. There is a ticket for this
improvement: https://ggsystems.atlassian.net/browse/IGN-4666
-Val
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Query-does-not-include-objects-added-into-Cache-from-within-a-transaction-tp7651p7688.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.