Responses inline. On Oct 11, 2013, at 7:10 PM, kzhang <[email protected]> wrote:
> I read the documentation again > (http://docs.basho.com/riak/latest/dev/references/http/fetch-object/). > > r - (read quorum) how many replicas need to agree when retrieving the object > (default is defined by the bucket) Not agree, necessarily, but how many need to respond before an answer is given to the client. > pr - how many primary replicas need to be online when doing the read > (default is defined by the bucket) Again, how many need to respond. > basic_quorum - whether to return early in some failure cases (eg. when r=1 > and you get 2 errors and a success basic_quorum=true would return an error) > (default is defined by the bucket) > notfound_ok - whether to treat notfounds as successful reads for the > purposes of R (default is defined by the bucket) > Correct. The various notfound_ok/basic_quorum/R combinations are captured in a table here: http://basho.com/riaks-config-behaviors-part-3/ > If I have: > > r = 1 > notfound_ok=true > basic_quorum = true > > does the client get notfound after 1 reply (since notfound_ok=true and r = > 1) or after 2 replies (since basic_quorum = true)? > Client will get notfound after 1 reply. > Or if I have: > > r = 1 > notfound_ok=false > basic_quorum = true > > the client gets notfound if the first two replies are notfound? if the first > reply is found, the client gets found? if the first reply is notfound, the > second is found, does the client get found, or have to wait for the third > vnode (in my environment, N=3) to reply? notfound will be returned only if both servers return notfound, and the request will not wait for a 3rd server in any sequence of events. > > In the next setup: > > r = 1 > notfound_ok=false > basic_quorum = false > > only when all three replies are notfound, then the client gets notfound? > otherwise, it is found. Correct. > > The last one: > > r = 1 > notfound_ok=true > basic_quorum = false > > which is the default. if the first reply is found, then client gets found. > if the first reply is notfound, clients gets notfound. Correct. -John _______________________________________________ riak-users mailing list [email protected] http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
