incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Damien Katz <damienk...@gmail.com>
Subject Re: multi-document acid transactions
Date Thu, 10 Apr 2008 15:21:39 GMT
Interesting usage, sorry the change broke that. That might be an  
enhancement we put back in the future, but for now trying to support  
both would complicate the code and slow down development (It's already  
a complicated area of the code).


On Apr 9, 2008, at 3:01 PM, Chris Anderson wrote:
> Damien,
>
> I can see the value of this feature, but there's also a lot of value
> in being able to do fire-and-forget multi document inserts. In my
> application I'm relying on uniq document id semantics, and was very
> happy to see that bulk inserts would create some but not all documents
> when the _rev property was absent and some ids were taken. It would
> extremely useful if there was a parameter that could choose not to run
> the inserts in a transaction.
>
> I'll understand if that is infeasible. If you don't have
> time/inclination to make the change, I'd happily pour over the diffs
> to try to add the option. Perhaps you can give a pointer to the
> check-in?
>
> Thanks for everything!
> Chris
>
> On 4/9/08, Damien Katz <damienkatz@gmail.com> wrote:
>> FYI, CouchDB now has multi-document ACID transactions. This were
>> checked in last week as part of a larger refactoring.
>>
>> To do a multi-document update, simply use the bulk update POST  
>> option.
>> If any document fails to commit due to conflict (or whatever reason),
>> then all the documents fail.  You can also delete documents in the
>> same bulk transaction, by setting the _deleted member in the document
>> to true.
>>
>> So now if all transactions happen on the single instance, you can use
>> bulk transactions and keep relationships and heirarchies amongst
>> documents intact at all times. But once the application is
>> distributed, then you potentially lose the ACID properties of the
>> updates, as the replication system won't preserve the atomicity of  
>> the
>> multi-document update.
>>
>> This mean I don't recommend relying on bulk updates to preserve  
>> inter-
>> document ACID properties in distributed applications, but it's
>> workable for applications that use only a single database instance.
>>
>
>
> -- 
> Chris Anderson
> http://jchris.mfdz.com


Mime
View raw message