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 3D6989400 for ; Tue, 22 Nov 2011 14:46:28 +0000 (UTC) Received: (qmail 59537 invoked by uid 500); 22 Nov 2011 14:46:26 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 59497 invoked by uid 500); 22 Nov 2011 14:46:26 -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 59489 invoked by uid 99); 22 Nov 2011 14:46:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Nov 2011 14:46:26 +0000 X-ASF-Spam-Status: No, hits=-5.0 required=5.0 tests=RCVD_IN_DNSWL_HI,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of Viktor.Szabo@morganstanley.com designates 205.228.53.68 as permitted sender) Received: from [205.228.53.68] (HELO hqmtaint01.ms.com) (205.228.53.68) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Nov 2011 14:46:21 +0000 Received: from hqmtaint01.ms.com (localhost.ms.com [127.0.0.1]) by hqmtaint01.ms.com (output Postfix) with ESMTP id 12786504689 for ; Tue, 22 Nov 2011 09:46:01 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=morganstanley.com; s=p20110615; t=1321973161; x=1323182761; bh=n15rmIznxBE7lmzQe7t1ue9j/HCbES5wxyW+WpjSxXk=; h=From:To:Subject:Date:Message-ID:References:In-Reply-To: Content-Type:Content-Transfer-Encoding:MIME-Version; b=QI9yDKrzFMK+VpCGsQXSkv+2L0joM/US7TYE49tuDii1TW1hfjAYds2TP8XY2yin4 cDE/V6gbOQGm6cUIccJUX8l30j/en/zQ4y2xUEwc2Q2P+tHSxBKpMJKIfrnwOfjIoC YZ2SnYsB/vZk3FY7G5wbi6jB/M0npl9fnYZ1y5Qk= Received: from ny021bas01.ms.com (ny021bas01.ms.com [10.162.156.33]) by hqmtaint01.ms.com (internal Postfix) with ESMTP id 10CC950447B for ; Tue, 22 Nov 2011 09:46:01 -0500 (EST) Received: from ny021bas01.ms.com (localhost [127.0.0.1]) by ny021bas01.ms.com (msa-out Postfix) with ESMTP id 018857B8022 for ; Tue, 22 Nov 2011 09:46:01 -0500 (EST) Received: from HNWEXGOB02.msad.ms.com (hn212c1n1 [10.184.121.167]) by ny021bas01.ms.com (mta-in Postfix) with ESMTP id F2CA1DE003A for ; Tue, 22 Nov 2011 09:46:00 -0500 (EST) Received: from NPWEXGIB01.msad.ms.com (10.184.26.184) by HNWEXGOB02.msad.ms.com (10.184.121.167) with Microsoft SMTP Server (TLS) id 8.3.213.0; Tue, 22 Nov 2011 09:46:00 -0500 Received: from OZWEX0203N1.msad.ms.com (10.208.87.17) by NPWEXGIB01.msad.ms.com (10.184.26.184) with Microsoft SMTP Server (TLS) id 8.3.213.0; Tue, 22 Nov 2011 09:45:59 -0500 Received: from OZWEX0202N2.msad.ms.com ([169.254.4.111]) by OZWEX0203N1.msad.ms.com ([169.254.1.29]) with mapi id 14.01.0339.001; Tue, 22 Nov 2011 14:45:58 +0000 From: "Szabo, Viktor (Enterprise Infrastructure)" To: Subject: RE: possible compact bug in 1.1.1 Thread-Topic: possible compact bug in 1.1.1 thread-index: AcypA5vr6+QWsbbdRX6tO3a1wVdWHQAFvAWAAABjz4AAAfkHAAAAWVag Date: Tue, 22 Nov 2011 14:45:58 +0000 Message-ID: <9032450E6B3D8244858652FFFD6E29BC029675@OZWEX0202N2.msad.ms.com> Content-Class: urn:content-classes:message Importance: normal Priority: normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4913 References: <9032450E6B3D8244858652FFFD6E29BC0294FC@OZWEX0202N2.msad.ms.com><7321244256499370376@unknownmsgid><9032450E6B3D8244858652FFFD6E29BC029611@OZWEX0202N2.msad.ms.com> In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.173.249.123] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: be3bdf5c-71de-49fb-a1b7-ad6a6a1df5e2 I'm getting an {"error":"conflict","reason":"Document update conflict."} = message all the time. -----Original Message----- From: Marcello Nuccio [mailto:marcello.nuccio@gmail.com]=20 Sent: 22 November 2011 15:36 To: user@couchdb.apache.org Subject: Re: possible compact bug in 1.1.1 What happens if you change the document? For example if you insert a field with a timestamp as in: $ curl -X PUT -H "Content-type: application/json" http://hostname:7002/test/dummy -d '{ "_id": "dummy", "a": "'$(date +%s)'" }' Marcello 2011/11/22 Szabo, Viktor (Enterprise Infrastructure) : > The very same thing happens: > > $ curl -X POST -H "Content-type: application/json"=20 > http://hostname:7002/test/_compact > {"ok":true} > $ curl -X PUT -H "Content-type: application/json" = http://hostname:7002/test/dummy -d '{ "_id": "dummy" }' > {"ok":true,"id":"dummy","rev":"1-967a00dff5e02add41819138abb3284d"} > > By the way, I've been using the API doc found over here: > http://www.couchbase.org/sites/default/files/uploads/all/documentation > /couchbase-api-dbdoc.html#couchbase-api-dbdoc_db_post > > Shouldn't I? > > Thanks, > Viktor > > -----Original Message----- > From: Robert Newson [mailto:robert.newson@gmail.com] > Sent: 22 November 2011 14:28 > To: user@couchdb.apache.org > Subject: Re: possible compact bug in 1.1.1 > > When couch requires a Referer header it is expecting form-data not = json. So it could be you have found a bug there. I'd call it serious if = you can induce the same thing with the correct input format. > > Use PUT instead of POST, drop the referer header and let us know what = happens. > > Sent from my iPhone > > On 22 Nov 2011, at 10:44, "Szabo, Viktor (Enterprise Infrastructure)" > wrote: > >> Hi CouchDB users, >> >> I don't know if this is a known issue or not, but I've been=20 >> experiencing strange behaviour in version 1.1.1 after initiating=20 >> compaction. Even though there's already a doc with the _id value of=20 >> "dummy" in my database, if I want to have it re-inserted after a = compact operation is started, 9 times out of 10, I receive an "ok":true = notification. Occasionally I'm seeing the expected conflict error. >> >> $ curl -X POST -H "Content-type: application/json" >> http://hostname:7002/test/_compact >> {"ok":true} >> $ curl -X POST -H "Content-type: application/json" -H "Referer: = http://hostname:7002/" http://hostname:7002/test -d '{ "_id": "dummy" }' >> {"ok":true,"id":"dummy","rev":"1-967a00dff5e02add41819138abb3284d"} >> $ curl -X POST -H "Content-type: application/json" >> http://hostname:7002/test/_compact >> {"ok":true} >> $ curl -X POST -H "Content-type: application/json" -H "Referer: = http://hostname:7002/" http://hostname:7002/test -d '{ "_id": "dummy" }' >> {"ok":true,"id":"dummy","rev":"1-967a00dff5e02add41819138abb3284d"} >> How is this possible? >> >> Given that I sometimes get an "ok" confirmation, but sometimes get a=20 >> "conflict error" for the very same request sent to the database with = the very same content, I don't really feel secure about the integrity of = the service. >> I'm thinking that the issue is related to the fact that the database=20 >> already had accepted a doc with the same id and content, but still, = undeterministic behaviour is not something I like. >> >> Do you have a clue on what might be going on? >> >> (I wasn't able to reproduce under 1.1.0. Used a single-node instance=20 >> with no replication set up and no clients connecting to the service) >> >> Thanks, >> Viktor >> >> --------------------------------------------------------------------- >> - >> ---- >> NOTICE: Morgan Stanley is not acting as a municipal advisor and the = opinions or views contained herein are not intended to be, and do not = constitute, advice within the meaning of Section 975 of the Dodd-Frank = Wall Street Reform and Consumer Protection Act. If you have received = this communication in error, please destroy all electronic and paper = copies and notify the sender immediately. Mistransmission is not = intended to waive confidentiality or privilege. Morgan Stanley reserves = the right, to the extent permitted under applicable law, to monitor = electronic communications. This message is subject to terms available at = the following link: http://www.morganstanley.com/disclaimers. If you = cannot access these links, please notify us by reply message and we will = send the contents to you. By messaging with Morgan Stanley you consent = to the foregoing. > > ---------------------------------------------------------------------- > ---- > NOTICE: Morgan Stanley is not acting as a municipal advisor and the = opinions or views contained herein are not intended to be, and do not = constitute, advice within the meaning of Section 975 of the Dodd-Frank = Wall Street Reform and Consumer Protection Act. If you have received = this communication in error, please destroy all electronic and paper = copies and notify the sender immediately. Mistransmission is not = intended to waive confidentiality or privilege. Morgan Stanley reserves = the right, to the extent permitted under applicable law, to monitor = electronic communications. This message is subject to terms available at = the following link: http://www.morganstanley.com/disclaimers. If you = cannot access these links, please notify us by reply message and we will = send the contents to you. By messaging with Morgan Stanley you consent = to the foregoing. -------------------------------------------------------------------------= - NOTICE: Morgan Stanley is not acting as a municipal advisor and the = opinions or views contained herein are not intended to be, and do not = constitute, advice within the meaning of Section 975 of the Dodd-Frank = Wall Street Reform and Consumer Protection Act. If you have received = this communication in error, please destroy all electronic and paper = copies and notify the sender immediately. Mistransmission is not = intended to waive confidentiality or privilege. Morgan Stanley reserves = the right, to the extent permitted under applicable law, to monitor = electronic communications. This message is subject to terms available at = the following link: http://www.morganstanley.com/disclaimers. If you = cannot access these links, please notify us by reply message and we will = send the contents to you. By messaging with Morgan Stanley you consent = to the foregoing.