incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael <>
Subject Write race conditions, working without _rev
Date Fri, 05 Nov 2010 15:57:30 GMT
Hello everyone;

Thanks again for all the help that I have gotten with Couch, this
group has really been helpful for my learning process.

I have gotten so far in my application that I am starting to find some
problems. The biggest one I have found is actually pertaining to
adding a _rev to every save. I read the existing object and pull the
_rev from that. This however creates a race condition where an
object's _rev might be out of date while I save.

In reality, I would love to write without a read--save a little
overhead-- but everything I have read and tried says that this will
produce an error. How do I get around this sort of race condition?
Even better, is there a way to update an object with reading first.

The second part is also a question in this article
from Adrian Cockcroft (part 2 of question 4).

Thanks for the help again,


View raw message