From dev-return-14788-apmail-couchdb-dev-archive=couchdb.apache.org@couchdb.apache.org Fri Feb 04 22:10:53 2011 Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 72989 invoked from network); 4 Feb 2011 22:10:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 Feb 2011 22:10:53 -0000 Received: (qmail 59467 invoked by uid 500); 4 Feb 2011 22:10:52 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 59232 invoked by uid 500); 4 Feb 2011 22:10:51 -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 59224 invoked by uid 99); 4 Feb 2011 22:10:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Feb 2011 22:10:51 +0000 X-ASF-Spam-Status: No, hits=-1996.4 required=5.0 tests=ALL_TRUSTED,FS_REPLICA,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Feb 2011 22:10:50 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id A72F3190172 for ; Fri, 4 Feb 2011 22:10:30 +0000 (UTC) Date: Fri, 4 Feb 2011 22:10:30 +0000 (UTC) From: "Paul Joseph Davis (JIRA)" To: dev@couchdb.apache.org Message-ID: <2073906317.735.1296857430681.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] Resolved: (COUCHDB-885) Attachments introduce conflicts after replication. 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-885?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Paul Joseph Davis resolved COUCHDB-885. --------------------------------------- Resolution: Fixed Fixed by COUCHDB-902 > Attachments introduce conflicts after replication. > -------------------------------------------------- > > Key: COUCHDB-885 > URL: https://issues.apache.org/jira/browse/COUCHDB-885 > Project: CouchDB > Issue Type: Bug > Components: Database Core > Affects Versions: 1.0.1 > Environment: Mac OSX, Windows XP, Windows 7 > Reporter: Nikolai Teofilov > Fix For: 1.2 > > > Step to reproduce the bug: > 1. Make database "test" on a remote couchdb server that reside on a different machine! > 2. Create new document: "http://remote-server:5984/test/doc" > 3. Create database "replica" on the local couchdb server. > 4. Trigger pull replication http://remote-server:5984/test -> http://localhost:5984/replica > 5. Attach a file to the replicated document on the local couchdb server. > 6. Trigger push replication http://localhost:5984/replica -> http://remote-server:5984/test > The document in the test database shows one conflict. If instead attachment the document is updated with a new field after the replication no conflict. > The same sequence shows no conflicts on CouchDB 0.11. > ************ test.sh **************** > #!/usr/bin/env bash > LOCAL="http://localhost:5984" > REMOTE="http://koleto.couchone.com" > echo "=====================================================" > echo "This sequence create a conflict after the replication" > echo "=====================================================" > echo "Cleanup" > curl --silent -X DELETE $LOCAL/replica > curl --silent -X DELETE $REMOTE/test > echo "Create database:" $REMOTE/test > curl --silent -X PUT $REMOTE/test > echo "Create empty document:" > curl --silent -d '{}' -X PUT $REMOTE/test/doc > echo "Create local databse:" $LOCAL/replica > curl --silent -X PUT $LOCAL/replica > echo "Pull replication:" REMOTE/test "->" $LOCAL/replica > curl --silent -X POST -d "{\"source\":\"$REMOTE/test\",\"target\":\"$LOCAL/replica\"}" -H 'Content-Type: application/json' $LOCAL/_replicate > echo "Put an attachment to the document:" > echo "foobar!" | curl --silent --upload-file - -X PUT "$LOCAL/replica/doc/foo.txt?rev=1-967a00dff5e02add41819138abb3284d" > echo "Push replication:" $LOCAL/replica "->" $REMOTE/test > curl --silent -X POST -d "{\"source\":\"$LOCAL/replica\",\"target\":\"$REMOTE/test\"}" -H 'Content-Type: application/json' $LOCAL/_replicate > echo '############## Get one conflic #####################' > curl --silent -X GET $REMOTE/test/doc?conflicts=true > echo "=====================================================" > echo "The same sequence with adding a field to the document" > echo "=====================================================" > echo "Cleanup" > curl --silent -X DELETE $LOCAL/replica > curl --silent -X DELETE $REMOTE/test > echo "Create database:" $REMOTE/test > curl --silent -X PUT $REMOTE/test > echo "Create empty document:" > curl --silent -d '{}' -X PUT $REMOTE/test/doc > echo "Create local databse:" $LOCAL/replica > curl --silent -X PUT $LOCAL/replica > echo "Pull replication:" REMOTE/test "->" $LOCAL/replica > curl --silent -X POST -d "{\"source\":\"$REMOTE/test\",\"target\":\"$LOCAL/replica\"}" -H 'Content-Type: application/json' $LOCAL/_replicate > echo "Adding a new field:" > curl --silent -d '{"foo":"bar" , "_rev" : "1-967a00dff5e02add41819138abb3284d" }' -X PUT $LOCAL/replica/doc?rev=1-967a00dff5e02add41819138abb3284d > echo "Push replication:" $LOCAL/replica "->" $REMOTE/test > curl --silent -X POST -d "{\"source\":\"$LOCAL/replica\",\"target\":\"$REMOTE/test\"}" -H 'Content-Type: application/json' $LOCAL/_replicate > echo '###### No conflicts after the replication ########' > curl --silent -X GET $REMOTE/test/doc?conflicts=true > -- This message is automatically generated by JIRA. - For more information on JIRA, see: http://www.atlassian.com/software/jira