Hello thammoud,

Try to use affinity feature for cache. For given accountId all 
PIDDetails better place in one node.
Example:

cacheCfg.setAffinityMapper(new AffinityKeyMapper() {
     @Override public Object affinityKey(Object key) {
         if (keyinstanceof PIDDetails){
             PIDDetails det = (PIDDetails)key;
             return det.getAccountId();
         }
         return key;
     }

     @Override public void reset() {
     }
});

13.06.2016 20:47, thammoud [via Apache Ignite Users] пишет:
> Thank you. A DS made a huge difference. Now I have 8 nodes with a 
> cache configured for one backup and it takes abut 15 seconds to load 
> the 100k records. Not perfect but much better than minutes. Regarding 
> transactions, I presume that wrapping the whole put operation in a 
> tx.begin() and tx.commit() will make those nodes visible only after 
> txn commit.
>
> IgniteTransactions transactions = ignite.transactions();
>
> try (Transaction tx = transactions.txStart()) {
>     try (IgniteDataStreamer<PIDDetailsKey, PIDDetails> ds = 
> ignite.dataStreamer(CACHE_NAME)) {
>           for (PIDDetails details : details.values()) {
>             ds.addData(details.getKey(), details);
>           }
>     }
>     tx.commit();
> }
>
> and it seems to work. My use case is as follows:
>
> 1) For a given account, load transaction details and create the proper 
> PIDDetails
> 2) Load all the PIDDetails into the cache
> 3) Commit the transaction to make visible to all
>
> There can only be account loader for a given account Id which I am 
> planning to use an account lock for enforcement.
>
>
>
>
>
>
> ------------------------------------------------------------------------
> If you reply to this email, your message will be added to the 
> discussion below:
> http://apache-ignite-users.70518.x6.nabble.com/Performance-Degredation-when-adding-more-nodes-tp5575p5615.html
>  
>
> To unsubscribe from Performance Degredation when adding more nodes, 
> click here 
> <http://apache-ignite-users.70518.x6.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5575&code=YW5kcmV5NHZlbEBnbWFpbC5jb218NTU3NXwtMjA2MDg0NDc4MQ==>.
> NAML 
> <http://apache-ignite-users.70518.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>  
>





--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Performance-Degredation-when-adding-more-nodes-tp5575p5654.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Reply via email to