On Wed, Apr 01, 2009 at 09:05:37AM +1030, Antony Blakey wrote: > > On 31/03/2009, at 11:14 PM, Brian Candler wrote: > >> Perhaps you want some sort of lock manager, whereby a client can >> request a >> lock on a group of documents, perform an update, then release the >> lock? > > Then you need deadlock detection due to ordering of lock acquisition. > Better to use the higher level concept of an atomic _bulk_docs.
Yeah, but CouchDB [TM] doesn't have that, so I'm suggesting an alternative. There are plenty of simple algorithms to avoid lock ordering problems. If I remember correctly, I think that just sorting the doc_ids you're interested in and grabbing them in ascending order should be sufficient.
