Re: Write-Behind Cache configuration and custom cache store

2017-09-06 Thread vkulichenko
Rick,

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

As for transactions, write-behind store updates are always non
transactional. I.e. you will have a transaction in cache, but updates in
this transaction will be written into store independently. Therefore you
don't observe database transaction commit in this scenario. If you need
strong consistency between cache and DB, use sync write-through.

-Val



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


Write-Behind Cache configuration and custom cache store

2017-09-06 Thread rick_tem
Hi,

I am using Ignite 2.0.0 with a cache configurations shown below.  First, I
noticed that writeAll() or any write() was not called on my cache store when
writeBehindEnabled=true but writeThrough=false.  Seems like if
writeBehindEnabled set to true, it should override writeThrough, but anyway,
I got around that.  With my writeBehind cache now calling writeAll() in my
cache store I noticed sessionEnd() is not called even when my cache is
TRANSACTIONAL.  Does this mean I have to call commit() on the connection at
the end of writeAll()?  How would I then differentiate a call to writeAll()
from putAll()?  It seems like sessionEnd() should be called when a flush
occurs if I am specifying a TRANSACTIONAL cache.  Is this a bug?  I am not
explicitly using transactions (i.e. try (Transaction tx =
transactions.txStart()) )...When I just use write through caching,
sessionEnd() is called without an explicit transaction and as well behaves
in a JTA environment.

Thanks for any clarification.

Best,
Rick













 



















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