Re: Re:Re: Re:Re: about write behind problems

2017-07-21 Thread vkulichenko
Can you provide a reproducer?

-Val



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/about-write-behind-problems-tp15160p15255.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Re:Re: about write behind problems

2017-07-20 Thread vkulichenko
Did you set the writeThrough property? It's needed to enable write to cache
store, regardless of whether it's write-behind mode or not.

cacheCfg.setWriteThrough(true);

-Val



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/about-write-behind-problems-tp15160p15219.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re:Re: about write behind problems

2017-07-20 Thread Lucky
Ok, in this case,I did not tell about loading cache.
It is about persistent data.
I want to insert 50 records into DB.
my setting is:
  cacheCfg.setWriteBehindEnabled(true);
  cacheCfg.setWriteBehindFlushSize(10240);
cacheCfg.setWriteBehindFlushFrequency(1);
cacheCfg.setWriteBehindBatchSize(1);
cacheCfg.setWriteBehindFlushThreadCount(3);




My question is:
1.WriteBehindEnabled parameter is set to true,but it seems not work.
   String sql = "insert into "mycache1".tableA(_key,fid,fname) 
select(fid,fid,orgid) from "mycache2".tableB";
   cache.query(new SqlFieldQuery(sql));


   this is update data to DB.
   but it wait until all data has finished  persistent to DB.
I just hope the flow can run continue when the cache is updated ,but not need 
to wait persistent .

2. setWriteBehindBatchSize is set to 1 and setWriteBehindFlushFrequency is 
set to 5 seconds,but in the log ,I see  that is not 1 each time,and There 
is no interval of 10 seconds


Thanks.
Lucky



At 2017-07-21 03:18:06, "vkulichenko" <valentin.kuliche...@gmail.com> wrote:
>Hi Lucky,
>
>Write behind affects the way how underlying store is updated when you update
>the cache. Load cache process is different and is not related to this. More
>information here: https://apacheignite.readme.io/docs/persistent-store
>
>-Val
>
>
>
>--
>View this message in context: 
>http://apache-ignite-users.70518.x6.nabble.com/about-write-behind-problems-tp15160p15205.html
>Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: about write behind problems

2017-07-20 Thread vkulichenko
Hi Lucky,

Write behind affects the way how underlying store is updated when you update
the cache. Load cache process is different and is not related to this. More
information here: https://apacheignite.readme.io/docs/persistent-store

-Val



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/about-write-behind-problems-tp15160p15205.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: write behind problems

2017-07-20 Thread vkulichenko
Hi Lucky,

I don't understand the use case. Are you loading data from DB to cache, or
writing to cache? Can you provide exact steps describing what you're doing?

-Val



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/write-behind-problems-tp15152p15201.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


write behind problems

2017-07-19 Thread Lucky
Hi:
As the updated data is more than 50,so I set write behind parameters to 
true with java code .
but it did not work .It's still wait until all data is persisted.
   When I debug the code ,I found my cache's cacheconfiguration is correctly 
set to true;
the setting is:
cacheCfg.setWriteBehindEnabled(true);
cacheCfg.setWriteBehindFlushSize(10240);
cacheCfg.setWriteBehindFlushFrequency(5000);
cacheCfg.setWriteBehindBatchSize(1);
cacheCfg.setWriteBehindFlushThreadCount(3);


 I startup a Ignite node by default-config.xml.
 And use lifeCycleBean(after_node_start event) to load above configure and 
load all datas to cache.
 
Any suggestion?


Thanks.
Lucky