You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by jaime spicciati <ja...@gmail.com> on 2017/01/11 12:28:32 UTC

Behavior of ScanQuery while updating

All,
This is a very basic question but I can't seem to find an answer. If I run
a ScanQuery in Atomic transaction mode, and while that query is running an
update occurs to one of the entries within the ScanQuery, what is the
expected behavior? What happens if an entry is deleted while the ScanQuery
is running? Does the ScanQuery 'lock' the view at that time or is it
possible that entries come and go while the ScanQuery is running?

If it is updated while the ScanQuery is running how would I go about
locking the data while the ScanQuery processes?

Thanks!

Re: Behavior of ScanQuery while updating

Posted by vkulichenko <va...@gmail.com>.
Hi,

Scan query doesn't lock anything. It behaves like any concurrent map - if
concurrent update happened on an entry that is not visited by the iterator
yet, you will then get new value.

What kind of locking are you looking for? It sounds like you want to block
the whole cache, which is generally a very bad idea.

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Behavior-of-ScanQuery-while-updating-tp10032p10036.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.