-
1. Re: Distributed cache, single node write behind/through, failover if writing node goes down
galder.zamarreno Feb 8, 2012 5:30 AM (in response to andylegear)If you only want one of the nodes to write to the backing store, simply enable the singleton store functionality, see https://docs.jboss.org/author/x/DwY5 for more info. I'm pretty sure this works fine with a replicated cache or a totally replicated cached, but with distribution, or partial replication, it might not work as expected because it relies on being the coordinator of the cluster in order to store the data (see https://docs.jboss.org/author/x/GwY5 to find out more about clustering modes). However, with distribution the coordinator might not all the data, so it might only work partially.
-
2. Re: Distributed cache, single node write behind/through, failover if writing node goes down
andylegear Feb 9, 2012 10:42 AM (in response to galder.zamarreno)Very good, thanks. I'll try that out.
And what about collision detection (two transactions on separate nodes writing to the same cache data) - will collisions reveal themselves in the form of an exception? or is it not possible with MVCC?
Andy
-
3. Re: Distributed cache, single node write behind/through, failover if writing node goes down
gdanov Feb 13, 2012 11:37 AM (in response to galder.zamarreno)Hi,
I read the documentation you linked to , however it is not fully clear to me - what is the default behaviour of a cacheStore in distributed cache with backups? If node X writes value which is located in the primary partition of node A, and in the backup of B, by default showe CacheStore gets to write it to the database?
Best Regards,
Georgi
-
4. Re: Distributed cache, single node write behind/through, failover if writing node goes down
galder.zamarreno Feb 15, 2012 6:10 AM (in response to andylegear)@Andrew, The reaction to those scenarions depends on whether you use optimistic or pessimistic locking. See https://docs.jboss.org/author/x/FAY5
@Georgi, I don't understand your question. With singleton store, only the coordinator of the cluster will write to the cache store. So, basically, unless the coordinator is an owner or backup for that data, it won't be written. This could be improved of course...