AlexanderKaraberov edited a comment on issue #592: MRView's seq btree needs 
custom sorter function.
URL: https://github.com/apache/couchdb/issues/592#issuecomment-409284332
 
 
   Hi @eiri  
   I don't want to escalate and create a separate issue for a behaviour which 
just seems confusing to me and probably is not a bug at all therefore I decided 
to ask here.
   So I have a document in the db which I delete either via `DELETE 
/db/doc?rev=1-aa...` or via `PUT db/doc?rev=1-aa...  -d "{_deleted":true}"`. 
   And now I want to "undelete" it via `PUT db/doc?rev=2-aa... -d 
"{_deleted":false}"`. This was working fine in the CouchDB 1.x and is something 
what I'd expect to work in 2.x too, because when updating an existing document, 
the current document revision must be included in the document for an obvious 
reason (updater has to know a node in the revision tree). But now in CouchDB 
2.x I receive:
   ```erlang
   {"error":"conflict","reason":"Document update conflict."}
   ```
   This works fine if I'm not including document revision in the request for 
the case when I "undelete" the doc. So, the actual logic still works and I see 
all the corresponding revisions via `revs_info=true`. My question is this an 
expected behaviour? And if yes what were the reasons behind this? I think this 
has something to do with the new logic in the `couch_db_updater` related to the 
merging of revision trees.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to