You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Anand Vijai <an...@gmail.com> on 2017/11/28 18:50:58 UTC

Re: Retrieving keys very slow from a partitioned, no backup, no replicated cache

Hi Alexey,

You are correct. I did not have my own CacheStore implementation.

I am currently writing my own implementation and using the below when
creating the cache:
cfgAcct.setCacheStoreFactory(FactoryBuilder.factoryOf(CacheJDBCAcctFactStore.class));

In the example code we are talking about, can you tell me how writeall will
be called? 
when the entry.setvalue() is called within Cache.invoke?


Regards,
Anand Vijai



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Retrieving keys very slow from a partitioned, no backup, no replicated cache

Posted by Alexey Popov <ta...@gmail.com>.
Hi Anand,

Ignite will collect a batch of updates for multiple operations if you enable
write-behind.
So, it will be done for entry.setvalue() within Cache.invoke for your case.

And then Ignite will make a writeall() call for the batch.

If your own CacheStore implementation does not override writeall() method
then a default implementation will be used:
foreach (entry in a batch) {
  write(entry);
}

So, please implement writeall() with respect to your legacy DB to have a
performance boost for batch updates.

Thank you,
Alexey



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/