From dev-return-22780-apmail-couchdb-dev-archive=couchdb.apache.org@couchdb.apache.org Tue Jul 31 21:46:38 2012 Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6F0C4D2BE for ; Tue, 31 Jul 2012 21:46:38 +0000 (UTC) Received: (qmail 84679 invoked by uid 500); 31 Jul 2012 21:46:35 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 84618 invoked by uid 500); 31 Jul 2012 21:46:35 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 84459 invoked by uid 99); 31 Jul 2012 21:46:35 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 Jul 2012 21:46:35 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id E082714285B for ; Tue, 31 Jul 2012 21:46:34 +0000 (UTC) Date: Tue, 31 Jul 2012 21:46:34 +0000 (UTC) From: "Robert Newson (JIRA)" To: dev@couchdb.apache.org Message-ID: <976002355.123937.1343771194921.JavaMail.jiratomcat@issues-vm> In-Reply-To: <444285387.123933.1343771194755.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Assigned] (COUCHDB-1518) HTTP COPY with attachments can leave the "revpos" of attachments higher than the "_rev" of the document MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/COUCHDB-1518?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Robert Newson reassigned COUCHDB-1518: -------------------------------------- Assignee: Robert Newson > HTTP COPY with attachments can leave the "revpos" of attachments higher than the "_rev" of the document > ------------------------------------------------------------------------------------------------------- > > Key: COUCHDB-1518 > URL: https://issues.apache.org/jira/browse/COUCHDB-1518 > Project: CouchDB > Issue Type: Bug > Components: Database Core > Affects Versions: 1.1.1, 1.2 > Environment: Debian Linux 6.0.5 / CouchDB 1.1.1 / Erlang R14B03 > Ubuntu Linux 12.04 / CouchDB 1.2.0 / Erlang R15B01 > Reporter: Colin Coghill > Assignee: Robert Newson > > When COPYing a document with attachments, the _rev of the new document is set to 1-something, but the revpos on the attachments is left as is, meaning they're generally higher than the _rev of the new document. > I believe this is incorrect, and will cause problems later when updating/replicating the document. (I believe I'm seeing specific problems and am working on a test case, but am not sure they're particularly necessary if this behaviour is incorrect) > It's quite possible I've misunderstood how attachment revpos works and that this behaviour is ok. > Specific naming IDs, attachments, etc, don't seem to matter, substitute your own. > Untested on earlier versions of CouchDB. > curl -X PUT http://127.0.0.1:5984/testdb/document1 -d '{"name": "cat pictures"}' > curl -X GET http://127.0.0.1:5984/testdb/document1 > # Note down REV and put it in the attachment upload: > curl -X PUT http://127.0.0.1:5984/testdb/document1/cat1.jpg?rev=REV --data-binary @cat1.jpg -H 'Content-Type: image/jpeg' > # Copy the document > curl -X COPY http://127.0.0.1:5984/testdb/document1 -H "Destination: document2" > curl -X GET http://127.0.0.1:5984/testdb/document2 > # Note: revision is 1-something > # revpos on attachment is 2-something -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira