Hi,

There is already a solution for your use case - you can use 
IgniteCache.getAllOutTx(…). No locks will be acquired for the keys passed to 
this method.

Alternatively, as it’s already suggested, you can make such caches ATOMIC if 
you don’t consider to use them in transactional mode.

—
Denis

> On May 30, 2016, at 6:50 PM, amitpa <ami...@nrifintech.com> wrote:
> 
> Alexei,
> 
> yes I understand with Ignite Optmistic means lock acquisition on write for
> READCOMMITED.
> 
> With PESSIMISTIC it would be on read.
> 
> However consider a cache like Country (contrived example )...many people may
> live in USA. But if someone tries to do a transaction for a entry on write
> all will lock on the same entry.
> 
> This is a contrived example, and I can ofcourse find multiple ways to
> circumvent this particular scenario.
> 
> But for some cases this can not be done. 
> 
> And if there is any cache config which says a cache is read only that should
> be fast enough.
> 
> However I wil try your work around.
> 
> Many thanks for your replies, it is really helpful.
> 
> 
> 
> --
> View this message in context: 
> http://apache-ignite-users.70518.x6.nabble.com/Affinity-Key-Mapping-tp5212p5327.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Reply via email to