incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Newson <rnew...@apache.org>
Subject Re: Unable to delete a document
Date Wed, 14 Dec 2011 20:05:59 GMT
Ah, this might be a genuine bug in 1.0.2. Can you upgrade to 1.0.3,
compact the db, and try again?

B.

On 14 December 2011 19:53, Jay Zamboni <jzamboni@vretina.com> wrote:
> 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_b4628a3a1630f179a354486750be9d95e6bc04a5/cae60d40a185675228fe99c34703ae37?conflicts=true
>
> {"_id":"cae60d40a185675228fe99c34703ae37","_rev":"198-dd54167dd860a8883ffd50f33bb87247","name":"Initial
> Test Form","description":"Need to collect a
> description","type":"template","tabMapping":"75e0298d5b491fd5aafa89aa5700b9d9","messageFolderList":[],"error":"not_found","reason":"missing","_conflicts":["197-287319f3f9511903d9d9dc0003ca3aa2","196-bd30bb923381a8a898751e228a1a660d","195-8b9b81582f560ef63dd9e39ffbd8256b","182-045b266b6288a9b75e4b3fda22f4024c","181-172f426be311af1b9ab1ed46ce328033","180-602ca30de87b82e3b971afed9776cde4","179-14dcbb9401fa54d5b12361240c3c503e","178-65177f914539dc37b451e07a29952105","177-2bcd2b10cef30c1da602cebc43bfe280","176-3100f6d9e37ed2528b1131c6070b6e8d","175-7605b5bd1ccd8087ed7bb5f3f94ee94b","174-b04cb7876bf047d898083821930ea488","173-e8fb196bd883e138380781782219b4cf","172-52fbd00c44ae74cd3b84785b9449f03b","171-abb08295f2031cf9a74a8305e6a2a1b2","170-5295c74a9e2809edfbf4171fb844895a","169-c4232784e96e9075f741a94730a67981","168-54800f5b0c7fcf6e651eb314112474e4","167-3e5405d4dad7aa8863172985b7b225e1","166-a299ed5a6fed425a2579fb97e90e2904","165-2534db89e0bf54df81a239ec9ed09f3d","164-f54967e1f2cc2de9f0fde610454ef9d1","163-32d69d761b4477ea0c0df15cf085a74d","162-f83abb8f3c34b731cf4077c681e0a0e0","161-36e130ff61fe2b2ff96e8d049b2d4928","160-8339569d63c993e59f5ef4f03b9a5380","78-8b0e9544b1596a20d3565e5f283ff2dc","77-c18662076e1abd4a9c9abf16eff627a7","76-b8dd80ce4b15cecc9a0c42537aca70d2","75-e4f130d920c00f0d57aa91fd4bcad54e","74-ad7bc08c81b6165c30044382a443223a","73-707a129c45a446e186c4dc2f25749e5e","72-a266b34da780d19a33f896bc0cdd6673","71-5e74a7389b03a98beebe18894025def2","70-fd20e61f07bea3386212256a989da8ee","69-b9b963730bcb28cd139a346221a43c67","68-9f0fafe6a02aee1608a4da74d533ddee","67-ff00b5cda37656f177119d3f8126e987","66-2555489ae94323898ddf5b7dff39910b","65-64fc60d2e5190e34dfadc3c805898231","64-215d4d73699b9c688dcacac884805805","27-04d73a89296c59a6bfcb34527b8b1dc4","26-52e7eef3be3c3e65e746d0a75223302b","25-f6c716ddf58b3f12289083b51a57642f","24-c216109f721272686738cb737b8fa4c4","23-fc5c0b7179fce22af6c7714fc58f6da2","22-810776422cc30587894d29a52a2f01e2","21-b671c9d1a2eb7a7f869f202af157a4e2","20-452a4bd046815d2b333bd436887c9a90","19-9dceed4f5275468b5025895fe6bd8c10","18-b028d8927f67384cedb40c52a2fbb931","17-3b7300394be172878ac53abb76d8e9d3","16-3ff4b2e41014568716a901260eb41147","15-83d916949db48156413ed1258728ff9d","14-499ecb6d2ba956cd4c7b949b5a2ca8c1","13-fa8855e16430d0a88ee02b98c9f45be2","12-cee3274621382be59104213a32d978f7","11-214605b564d9faad8431cfd322194468","10-67f2adfe0fccce1795130811a8540d76","9-2f9795d1b63fe7c0ef461239eaed722d","8-e876c978d4a6cf43112247c06feb4b65","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,"length":6803,"stub":true}}}
>
>
> On Wed, Dec 14, 2011 at 11:55 AM, Robert Newson <rnewson@apache.org> 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_b4628a3a1630f179a354486750be9d95e6bc04a5/cae60d40a185675228fe99c34703ae37?conflicts=true
>> '?
>>
>> B.
>>
>> On 14 December 2011 18:10, Jay Zamboni <jzamboni@vretina.com> 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_b4628a3a1630f179a354486750be9d95e6bc04a5/cae60d40a185675228fe99c34703ae37
>> >
>> >
>> {"_id":"cae60d40a185675228fe99c34703ae37","_rev":"198-dd54167dd860a8883ffd50f33bb87247","name":"Initial
>> > Test Form","description":"Need to collect a
>> >
>> description","type":"template","tabMapping":"75e0298d5b491fd5aafa89aa5700b9d9","messageFolderList":[],"error":"not_found","reason":"missing","_attachments":{"form.svg":{"content_type":"image/svg+xml","revpos":1,"length":15622,"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_b4628a3a1630f179a354486750be9d95e6bc04a5/cae60d40a185675228fe99c34703ae37?rev=198-dd54167dd860a8883ffd50f33bb87247
>> >
>> > {"error":"conflict","reason":"Document update conflict."}
>> >
>> >
>> > $ curl -X GET
>> >
>> http://admin:admin@10.7.1.151:5984/users_b4628a3a1630f179a354486750be9d95e6bc04a5/cae60d40a185675228fe99c34703ae37
>> >
>> >
>> {"_id":"cae60d40a185675228fe99c34703ae37","_rev":"198-dd54167dd860a8883ffd50f33bb87247","name":"Initial
>> > Test Form","description":"Need to collect a
>> >
>> description","type":"template","tabMapping":"75e0298d5b491fd5aafa89aa5700b9d9","messageFolderList":[],"error":"not_found","reason":"missing","_attachments":{"form.svg":{"content_type":"image/svg+xml","revpos":1,"length":15622,"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 <rnewson@apache.org>
>> wrote:
>> >
>> >> If you can show a deletion attempt using curl, that would help.
>> >>
>> >> On 14 December 2011 17:21, Robert Newson <rnewson@apache.org> wrote:
>> >> > Did you pass the current _rev when trying to delete?
>> >> >
>> >> > On 14 December 2011 17:06, Jay Zamboni <jzamboni@vretina.com>
wrote:
>> >> >> While implementing conflict resolution in our application it appears
>> 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
futon
>> 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
rev.
>> >>  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
the
>> >> >> 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 database
>> >> 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
>> >>
>>

Mime
View raw message