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

Index Maintenance During Transactions

When updating a partitioned/replicated cache(s) in a transactions, does
Ignite update the indexes as part of the transaction or is that done after
the transaction commit? In either case is this configurable?

Thanks!



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Index-Maintenance-During-Transactions-tp10088.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Index Maintenance During Transactions

Posted by vkulichenko <va...@gmail.com>.
Correct.

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Index-Maintenance-During-Transactions-tp10088p10143.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Index Maintenance During Transactions

Posted by pragmaticbigdata <am...@gmail.com>.
Ok. Just so that we are on the same page, the transaction duration would
include the amount of time to perform data updates and the time to
rebuilt/update the indexes, right?



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Index-Maintenance-During-Transactions-tp10088p10137.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Index Maintenance During Transactions

Posted by vkulichenko <va...@gmail.com>.
I think Dmitry meant that indexes are updated synchronously with transaction
commit. However, note that SQL queries are currently not transactional, so
you can still get dirty reads in the result set.

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Index-Maintenance-During-Transactions-tp10088p10129.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Index Maintenance During Transactions

Posted by pragmaticbigdata <am...@gmail.com>.
Ok. So this means that the index maintenance is done in the background. Is
there some kind of flag that stops the index usage by any queries executed
after the transaction commit and before the indexes are completely rebuilt?
If not, would the queries that use these indexes give wrong results?

Assuming T1 is the transaction that updated the data and after it committed
a background thread(?) started rebuilding the data. Another parallel request
tries to query the cache such that one or more indexes get used. Would this
query use stale indexes and lead to incorrect results or not use any indexes
at all?

Thanks.



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Index-Maintenance-During-Transactions-tp10088p10110.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Index Maintenance During Transactions

Posted by dkarachentsev <dk...@gridgain.com>.
Hi, 

After each transaction all affected indexes are rebuilt, and this behavior
is not configurable for now.

- Dmitry.



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Index-Maintenance-During-Transactions-tp10088p10095.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.