couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antony Blakey <antony.bla...@gmail.com>
Subject Re: Please allow _prefix for auto-created _id
Date Sun, 08 Mar 2009 04:35:05 GMT

On 08/03/2009, at 1:35 PM, Paul Davis wrote:

>> I don't see how this would solve the problem of e.g. double  
>> invocations of a
>> replicate/compact/purge POST. I'm not sure what kind of delays  
>> between
>> double POSTs one needs to deal with, but given that POSTs (and  
>> maybe all
>> methods) do have this problem (regardless of whether the error is  
>> in the
>> browser stack or middleware), this would seem to be a generic  
>> solution that
>> cannot be solved in the client.
>>
>
> This is most likely because the issue at hand has nothing to do with
> replication, compaction, or purging. This issue can be solved in the
> client exactly as Chris described in the second email in this thread.
>
> The bottom line here is that you should not rely on CouchDB to
> automatically add a document id if you need to know that specific ID
> in the future. It is more than possible that the document is created
> without the client having knowledge of the new id due to any number of
> errors.

I'm not talking about documents - I accept those points and have  
previously suggested that the API to create documents without an ID be  
removed.

I'm proposing a generic solution to the problem of double POSTs for  
non-document operations such as triggering a replication/compaction et  
al.

Antony Blakey
--------------------------
CTO, Linkuistics Pty Ltd
Ph: 0438 840 787

I contend that we are both atheists. I just believe in one fewer god  
than you do. When you understand why you dismiss all the other  
possible gods, you will understand why I dismiss yours.
   --Stephen F Roberts



Mime
View raw message