ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Denis Magda <dma...@gridgain.com>
Subject Re: Affinity Key Mapping
Date Tue, 31 May 2016 12:57:00 GMT

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.


> On May 30, 2016, at 6:50 PM, amitpa <amitpa@nrifintech.com> wrote:
> Alexei,
> yes I understand with Ignite Optmistic means lock acquisition on write for
> 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.

View raw message