Hi Rob, If you print the fields in the document you retrieved from Riak, does it appear to be an older version? Could there perhaps be some problem with serialisation/de-serialisation of the data?
Regards, Christian On 12 Apr 2013, at 07:30, Erik Søe Sørensen <e...@trifork.com> wrote: > Is there any chance that the key in question exists in the bucket prior to > the test? If so, then you should update the value (read+write) instead of > trying to create it as a whole new object. This has to do with the nature of > vector clocks. > > /Erik [not familiar with the Python client API] > > > > -------- Oprindelig meddelelse -------- > Fra: Rob Speer <r...@luminoso.com> > Dato: > Til: riak-users Users <riak-users@lists.basho.com> > Emne: Am I misunderstand read and write quorum? Or am I losing writes? > > > My understanding is that if you write a document to a cluster of 4 riak > servers with w='quorum', then read from that same cluster with r='quorum', > that the read should reflect the result of the right. > > My understanding is also that, in the Python client (version 5525f4f3, from > master), w = r = 'quorum' by default. > > And yet, the following check in my code fails occasionally: > > riak_obj = bucket.new(docid, doc) > riak_obj.store() > echo_doc = bucket.get(docid).data > for field in doc: > assert doc[field] == echo_doc[field], (doc, echo_doc) > > > I thought perhaps my W and R settings were wrong and I was just getting > "eventual consistency", so I tried a very slow version where I waited five > seconds before reading the updated document. This seems to fail just as > often. So it doesn't just seem like I'm reading a write that hasn't happened > yet; it seems that the occasional write may _never happen at all_. > > Have I misunderstood something? If not, why would this happen, and how can I > track it down? > -- Rob > > _______________________________________________ > riak-users mailing list > riak-users@lists.basho.com > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
_______________________________________________ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com