Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 357CF9A2D for ; Wed, 14 Dec 2011 19:53:42 +0000 (UTC) Received: (qmail 85431 invoked by uid 500); 14 Dec 2011 19:53:40 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 85400 invoked by uid 500); 14 Dec 2011 19:53:40 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 85392 invoked by uid 99); 14 Dec 2011 19:53:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Dec 2011 19:53:40 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [209.85.160.52] (HELO mail-pw0-f52.google.com) (209.85.160.52) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Dec 2011 19:53:30 +0000 Received: by pbdd7 with SMTP id d7so1395646pbd.11 for ; Wed, 14 Dec 2011 11:53:08 -0800 (PST) MIME-Version: 1.0 Received: by 10.68.75.130 with SMTP id c2mr4990717pbw.93.1323892388589; Wed, 14 Dec 2011 11:53:08 -0800 (PST) Received: by 10.68.58.38 with HTTP; Wed, 14 Dec 2011 11:53:08 -0800 (PST) In-Reply-To: References: Date: Wed, 14 Dec 2011 12:53:08 -0700 Message-ID: Subject: Re: Unable to delete a document From: Jay Zamboni To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=f46d041b47328af00f04b412b781 X-Virus-Checked: Checked by ClamAV on apache.org --f46d041b47328af00f04b412b781 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable couchdb 1.0.2 My conflict resolution had a bug that caused this problem, and once the condition occurred, it kept adding more conflicts as it tried to resolve them. The other odd condition here is that rev 198-dd54167dd860a8883ffd50f33bb87247 is not the most recent rev in the database. However at this time the more recent rev has been deleted. Jay http://admin:admin@10.7.1.151:5984/users_b4628a3a1630f179a354486750be9d95e6= bc04a5/cae60d40a185675228fe99c34703ae37?conflicts=3Dtrue {"_id":"cae60d40a185675228fe99c34703ae37","_rev":"198-dd54167dd860a8883ffd5= 0f33bb87247","name":"Initial Test Form","description":"Need to collect a description","type":"template","tabMapping":"75e0298d5b491fd5aafa89aa5700b9= d9","messageFolderList":[],"error":"not_found","reason":"missing","_conflic= ts":["197-287319f3f9511903d9d9dc0003ca3aa2","196-bd30bb923381a8a898751e228a= 1a660d","195-8b9b81582f560ef63dd9e39ffbd8256b","182-045b266b6288a9b75e4b3fd= a22f4024c","181-172f426be311af1b9ab1ed46ce328033","180-602ca30de87b82e3b971= afed9776cde4","179-14dcbb9401fa54d5b12361240c3c503e","178-65177f914539dc37b= 451e07a29952105","177-2bcd2b10cef30c1da602cebc43bfe280","176-3100f6d9e37ed2= 528b1131c6070b6e8d","175-7605b5bd1ccd8087ed7bb5f3f94ee94b","174-b04cb7876bf= 047d898083821930ea488","173-e8fb196bd883e138380781782219b4cf","172-52fbd00c= 44ae74cd3b84785b9449f03b","171-abb08295f2031cf9a74a8305e6a2a1b2","170-5295c= 74a9e2809edfbf4171fb844895a","169-c4232784e96e9075f741a94730a67981","168-54= 800f5b0c7fcf6e651eb314112474e4","167-3e5405d4dad7aa8863172985b7b225e1","166= -a299ed5a6fed425a2579fb97e90e2904","165-2534db89e0bf54df81a239ec9ed09f3d","= 164-f54967e1f2cc2de9f0fde610454ef9d1","163-32d69d761b4477ea0c0df15cf085a74d= ","162-f83abb8f3c34b731cf4077c681e0a0e0","161-36e130ff61fe2b2ff96e8d049b2d4= 928","160-8339569d63c993e59f5ef4f03b9a5380","78-8b0e9544b1596a20d3565e5f283= ff2dc","77-c18662076e1abd4a9c9abf16eff627a7","76-b8dd80ce4b15cecc9a0c42537a= ca70d2","75-e4f130d920c00f0d57aa91fd4bcad54e","74-ad7bc08c81b6165c30044382a= 443223a","73-707a129c45a446e186c4dc2f25749e5e","72-a266b34da780d19a33f896bc= 0cdd6673","71-5e74a7389b03a98beebe18894025def2","70-fd20e61f07bea3386212256= a989da8ee","69-b9b963730bcb28cd139a346221a43c67","68-9f0fafe6a02aee1608a4da= 74d533ddee","67-ff00b5cda37656f177119d3f8126e987","66-2555489ae94323898ddf5= b7dff39910b","65-64fc60d2e5190e34dfadc3c805898231","64-215d4d73699b9c688dca= cac884805805","27-04d73a89296c59a6bfcb34527b8b1dc4","26-52e7eef3be3c3e65e74= 6d0a75223302b","25-f6c716ddf58b3f12289083b51a57642f","24-c216109f7212726867= 38cb737b8fa4c4","23-fc5c0b7179fce22af6c7714fc58f6da2","22-810776422cc305878= 94d29a52a2f01e2","21-b671c9d1a2eb7a7f869f202af157a4e2","20-452a4bd046815d2b= 333bd436887c9a90","19-9dceed4f5275468b5025895fe6bd8c10","18-b028d8927f67384= cedb40c52a2fbb931","17-3b7300394be172878ac53abb76d8e9d3","16-3ff4b2e4101456= 8716a901260eb41147","15-83d916949db48156413ed1258728ff9d","14-499ecb6d2ba95= 6cd4c7b949b5a2ca8c1","13-fa8855e16430d0a88ee02b98c9f45be2","12-cee327462138= 2be59104213a32d978f7","11-214605b564d9faad8431cfd322194468","10-67f2adfe0fc= cce1795130811a8540d76","9-2f9795d1b63fe7c0ef461239eaed722d","8-e876c978d4a6= cf43112247c06feb4b65","7-95d699536135f3bd6e5199fae96abd45"],"_attachments":= {"form.svg":{"content_type":"image/svg+xml","revpos":1,"length":15622,"stub= ":true},"form_overlay.svg":{"content_type":"image/svg+xml","revpos":1,"leng= th":6803,"stub":true}}} On Wed, Dec 14, 2011 at 11:55 AM, Robert Newson wrote: > That's very odd. What version of CouchDB are you using? Can you show > the output of 'curl > > http://admin:admin@10.7.1.151:5984/users_b4628a3a1630f179a354486750be9d95= e6bc04a5/cae60d40a185675228fe99c34703ae37?conflicts=3Dtrue > '? > > B. > > On 14 December 2011 18:10, Jay Zamboni wrote: > > Below is the output of a GET followed by a DELETE and another GET to > verify > > nothing has changed. > > > > $curl -X GET > > > http://admin:admin@10.7.1.151:5984/users_b4628a3a1630f179a354486750be9d95= e6bc04a5/cae60d40a185675228fe99c34703ae37 > > > > > {"_id":"cae60d40a185675228fe99c34703ae37","_rev":"198-dd54167dd860a8883ff= d50f33bb87247","name":"Initial > > Test Form","description":"Need to collect a > > > description","type":"template","tabMapping":"75e0298d5b491fd5aafa89aa5700= b9d9","messageFolderList":[],"error":"not_found","reason":"missing","_attac= hments":{"form.svg":{"content_type":"image/svg+xml","revpos":1,"length":156= 22,"stub":true},"form_overlay.svg":{"content_type":"image/svg+xml","revpos"= :1,"length":6803,"stub":true}}} > > > > $ curl -X DELETE > > > http://admin:admin@10.7.1.151:5984/users_b4628a3a1630f179a354486750be9d95= e6bc04a5/cae60d40a185675228fe99c34703ae37?rev=3D198-dd54167dd860a8883ffd50f= 33bb87247 > > > > {"error":"conflict","reason":"Document update conflict."} > > > > > > $ curl -X GET > > > http://admin:admin@10.7.1.151:5984/users_b4628a3a1630f179a354486750be9d95= e6bc04a5/cae60d40a185675228fe99c34703ae37 > > > > > {"_id":"cae60d40a185675228fe99c34703ae37","_rev":"198-dd54167dd860a8883ff= d50f33bb87247","name":"Initial > > Test Form","description":"Need to collect a > > > description","type":"template","tabMapping":"75e0298d5b491fd5aafa89aa5700= b9d9","messageFolderList":[],"error":"not_found","reason":"missing","_attac= hments":{"form.svg":{"content_type":"image/svg+xml","revpos":1,"length":156= 22,"stub":true},"form_overlay.svg":{"content_type":"image/svg+xml","revpos"= :1,"length":6803,"stub":true}}} > > > > > > On Wed, Dec 14, 2011 at 10:22 AM, Robert Newson > wrote: > > > >> If you can show a deletion attempt using curl, that would help. > >> > >> On 14 December 2011 17:21, Robert Newson wrote: > >> > Did you pass the current _rev when trying to delete? > >> > > >> > On 14 December 2011 17:06, Jay Zamboni wrote: > >> >> While implementing conflict resolution in our application it appear= s > I > >> >> created a bad document. A bug in my code seems to have written the > >> >> _conflicts data from an old rev that had a conflict into the head > >> document. > >> >> When viewing the document from the database listing screen in futo= n > I > >> see > >> >> the document and its _conflicts field. > >> >> > >> >> Now that I have this condition, I can't seem to get rid of the > document > >> >> using either the REST API or futon. When trying to delete the > document > >> I > >> >> get an error "Document update conflict". > >> >> > >> >> Another odd thing is that using Futon I can see the document on the > >> listing > >> >> page with one rev, but when I edit the document I see an earlier re= v. > >> If I > >> >> delete it in Futon I get the same conflict error. If I use > javascript > >> to > >> >> delete either of the revs I get the same error. I tried updating t= he > >> >> document with _conflicts set to null, but that did not work either. > >> >> > >> >> I am in the testing phase, so I assume I can just delete the databa= se > >> and > >> >> everything will be fine. However, if something like this ever > happens > >> >> after we go to production I would like to be able to resolve the > issue. > >> >> > >> >> Does anyone have any ideas? I am using couchdb 1.0.2. > >> >> > >> >> Thanks > >> >> > >> >> Jay > >> > --f46d041b47328af00f04b412b781--