-
1. Re: How to fail PUT if minimum number of replicas isn't achieved?
mircea.markus Jul 4, 2014 10:33 AM (in response to james.brealey)1 of 1 people found this helpfulThe number of redundant copies is configured in Infinispan through numOwners config option. (That's if you use a distributed cache, for replicated caches the numOwnes is set to cluster size).
A cache write *always fails* if less than numOwners nodes are updated. There's no way to negotiate this failure condition ATM, e.g specify the update to be successful if numOwners-2 nodes ack.
Does this answer your question?
-
2. Re: How to fail PUT if minimum number of replicas isn't achieved?
james.brealey Jul 4, 2014 12:24 PM (in response to mircea.markus)Yes, that's perfect. Thank-you very much, I had failed to appreciate numOwners could be used with a replicated cache.
-
3. Re: How to fail PUT if minimum number of replicas isn't achieved?
james.brealey Jul 15, 2014 5:55 AM (in response to mircea.markus)Sorry to come back to this, but I am after a little clarification:
A cache write *always fails* if less than numOwners nodes are updated.
So when using a (synchronous) distributed cache, if ( numOwners > clusterSize) then cache writes should fail?
I ask because this is not the behaviour I am seeing - with a cluster size between 1 and 4 I am able to successfully PUT when numOwners is set to 5.
Many Thanks
James
(See: captPatches/PutFailTest · GitHub for simple test:
git clone git@github.com:captPatches/PutFailTest.git
mvn clean install )
-
4. Re: How to fail PUT if minimum number of replicas isn't achieved?
james.brealey Jul 17, 2014 7:14 AM (in response to james.brealey)Opps, above link wants my git keys, correct link is:
Correct Git link is:
git clone https://github.com/captPatches/PutFailTest.git
mvn clean install
-
5. Re: How to fail PUT if minimum number of replicas isn't achieved?
aolenev Jul 18, 2014 5:59 AM (in response to james.brealey)Confirm, I'm able to put object even if I have just single-node cluster.
-
6. Re: How to fail PUT if minimum number of replicas isn't achieved?
william.burns Jul 18, 2014 7:53 AM (in response to aolenev)There is no way to control or tune the consistency level on a write, it is set by the numOwners in the configuration as Mircea mentioned. However there is no way to force a write to error if less than numOwners is written to if there aren't that many members in the cluster to begin with.
The contract is more of the case of we will guarantee the write to numOwners if there are more than numOwners in the cluster or up to the current number of members if it is less than numOwners. The differentiating piece is the fact that Infinispan is highly consistent and is not eventually consistent where tunable consistency is used.
[ISPN-999] Support eventual consistency - JBoss Issue Tracker might be of interest to you.
-
7. Re: How to fail PUT if minimum number of replicas isn't achieved?
james.brealey Jul 18, 2014 11:55 AM (in response to william.burns)Many Thanks for the responses.
James