write behind not working for RDBMS

classic Classic list List threaded Threaded
3 messages Options
himanshu himanshu
Reply | Threaded
Open this post in threaded view
|

write behind not working for RDBMS

Hi,

I am using ignite 2.7.0, when I am trying to test write through and write
behind, I am running in to issues. when I enable write through I am able to
write to mysql database while in case of write through data is not getting
written in database. any help is appriciated



CacheConfiguration<Long, Employee> employeeCacheConfiguration = new
CacheConfiguration<>("EmployeeCache");
                employeeCacheConfiguration.setIndexedTypes(Long.class, Employee.class);

                employeeCacheConfiguration.setWriteBehindEnabled(true);
// employeeCacheConfiguration.setWriteBehindFlushFrequency(1);
                employeeCacheConfiguration.setWriteBehindBatchSize(1);
                employeeCacheConfiguration.setWriteBehindFlushSize(1);

                employeeCacheConfiguration.setReadThrough(true);
// employeeCacheConfiguration.setWriteThrough(true);

I tried various configurations such as flush frequency, batch size etc but
write behind is not working :(



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
ezhuravlev ezhuravlev
Reply | Threaded
Open this post in threaded view
|

Re: write behind not working for RDBMS

Hi,

writeThrough property enables cache store integration overall, while 
writeBehindEnabled property controls whether store updates are async or not. 
So this is correct behavior. 

Evgenii

вт, 2 апр. 2019 г. в 00:24, himanshu <[hidden email]>:
Hi,

I am using ignite 2.7.0, when I am trying to test write through and write
behind, I am running in to issues. when I enable write through I am able to
write to mysql database while in case of write through data is not getting
written in database. any help is appriciated



CacheConfiguration<Long, Employee> employeeCacheConfiguration = new
CacheConfiguration<>("EmployeeCache");
                employeeCacheConfiguration.setIndexedTypes(Long.class, Employee.class);

                employeeCacheConfiguration.setWriteBehindEnabled(true);
//              employeeCacheConfiguration.setWriteBehindFlushFrequency(1);
                employeeCacheConfiguration.setWriteBehindBatchSize(1);
                employeeCacheConfiguration.setWriteBehindFlushSize(1);

                employeeCacheConfiguration.setReadThrough(true);
//              employeeCacheConfiguration.setWriteThrough(true);

I tried various configurations such as flush frequency, batch size etc but
write behind is not working :(



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
himanshu himanshu
Reply | Threaded
Open this post in threaded view
|

Re: write behind not working for RDBMS

Thanks for clarification, I tried with both write behind and write through
flags enabled and it is working fine now



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