mfronczyk wrote
> Makes sense. CacheStore needs to clear that transient information after
> writing the data to the persistent store. I'm assuming it doesn't require
> any synchronization with the entry processor in the write-through scenario
> because the key is still locked in CacheStore.

That's right. Actually, clean up is not required, because a copy of the
value will be created each time you read it, so entry processor will not get
the same instance that is stored in cache. BTW, if you want to override this
behavior for performance reasons, set
CacheConfiguration.setCopyOnRead(false) property.

mfronczyk wrote
> How will it work in the write-behind scenario? Are writes blocked during
> persisting in the write-behind mode and it's safe to modify the value
> passed to the store after persisting it?

With write-behind writes to persistence store happen asynchronously in
background, so they don't block any cache operations. If copyOnRead=true
(default value), it should work for you, because the independent copy will
be written to the store. copyOnRead=false should not be used with
write-behind at all, because the value written to store will be likely
updated by that time.

-Val



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Can-Ignite-be-configured-to-provide-an-array-like-replicated-and-durable-map-tp1304p1370.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Reply via email to