Hi Matt,

In your case ignite.compute().affinityRun(...) is redundant - if you simply
call cache.invoke(...), it will send your EntryProcessor to the primary
node for the specified key, where it will be executed.

Hope this helps.

On Wed, Aug 30, 2017 at 4:39 PM, matt <[email protected]> wrote:

> I'm using @AffinityKeyMapped to ensure that all items of a particular
> field (the "parent" in my case) are processed on the same node. When I want
> to process an entree, I'm essentially doing 
> ignite.compute().affinityRun("my-cache",
> key, () -> this::processEntry); where processEntry does: cache.invoke(key,
> (entry, args) -> { if( entry.exists() ){ modify(entry); } else {
> create(entry); } return true; }); Is this generally a valid way to deal
> with atomically updating entrees within a partitioned cache? Thanks, - Matt
> ------------------------------
> Sent from the Apache Ignite Users mailing list archive
> <http://apache-ignite-users.70518.x6.nabble.com/> at Nabble.com.
>



-- 
Best regards,
Ilya

Reply via email to