replication broken in couchdb 1.0.1

Bug #803567 reported by RNZ
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
couchdb (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

http://wiki.apache.org/couchdb/Breaking_changes#Changes_Between_1.0.0_and_1.1.0
and in couchdb 1.0.1 replication is broken.

Reproduce:
#create dirs and copy configs
$ mkdir -p couch1/db couch2/db
$ cp /etc/couchdb/*.ini couch1/
$ cp /etc/couchdb/*.ini couch2/

#change "[couchdb].database_dir = ./db" and "[couchdb].view_index_dir = ./db"
#cnange "[httpd].port = 5984" "[ssl].port = 6984"
$ nano couch1/default.ini

#change "[couchdb].database_dir = ./db" and "[couchdb].view_index_dir = ./db"
#change "[httpd].port = 5985" "[ssl].port = 6985"
$ nano couch2/default.ini

# add "[admins].admin = pass"
$ nano couch1/local.ini
$ nano couch2/local.ini

#run two instance couchdb
$ cd couch1
$ /usr/bin/couchdb -a ./default.ini -a ./local.ini -b -r 0 -p ./couchdb.pid -o /dev/null -e /dev/null -R &
$ cd ..
$ cd couch2
$ /usr/bin/couchdb -a ./default.ini -a ./local.ini -b -r 0 -p ./couchdb.pid -o /dev/null -e /dev/null -R &
$ cd ..

#create database
$ curl -H "Content-Type: application/json" -X PUT http://admin:pass@127.0.0.1:598{4,5}/testdb

#start replication
$ curl -H "Content-Type: application/json" -X POST http://admin:pass@127.0.0.1:5985/_replicate -d '{"source":"http://admin:pass@127.0.0.1:5984/testdb", "target":"http://admin:pass@127.0.0.1:5985/testdb", "continuous":true}

#add document
$ curl -H "Content-Type: application/json" -X PUT http://admin:pass@127.0.0.1:5984/testdb/sampledoc -d '{"doom-version":"0"}'

# get jsawk
$ wget https://raw.github.com/micha/jsawk/master/jsawk
$ chmod +x jsawk

#create simple bash
$ nano test.sh
#!/usr/bin/env bash
host="http://admin:pass@127.0.0.1:5984"
db="testdb"
doc="sampledoc"
curl="curl -s -H \"Content-Type: application/json\" -X "
cget="GET ${host}/${db}/${doc}"
cput="PUT ${host}/${db}/${doc} -d "
akey="\"doom-version\""
for ((cv=1; cv <= 100000 ; cv++))
do
  rev="\"`$cget | ./jsawk 'return this._rev'`\""
  eval $curl $cput "'{""\"_rev\":${rev},${akey}:\"${cv}\"""}'"
done

#run test.sh
$ test.sh

#run new terminal window and look state:
$ watch -n0 'curl -s http://127.0.0.1:598{4,5}/_active_tasks; curl -s -H "Content-Type: application/json" -X GET http://127.0.0.1:598{4,5}/testdb/_all_docs; curl -s -H "Content-Type: application/json" -X GET http://127.0.0.1:598{4,5}/testdb/sampledoc'

Revision history for this message
Eric Drechsel (ericdrex) wrote :

Thanks for the detailed report, RNZ. I have been experiencing the replication issue between CouchDB 1.1.0 and Ubuntu's CouchDB (1.0.1) and was wondering if anyone else had the same problem. According to your report replication is even broken between instances of Ubuntu's CouchDB. Suck!

Packaging CouchDB 1.1.0 is important (I've been trying to do that using Debian Sid's source package) but should be in a separate issue.

summary: - 1.0.1 - replication broken and need new version of couchdb 1.1.0
+ replication broken in couchdb 1.0.1
tags: removed: 1.1.0 version
Revision history for this message
RNZ (renoizer) wrote :

Ups, replace:
#!/usr/bin/env bash
host="http://127.0.0.1:5984"

#!/usr/bin/env bash
host="http://admin:pass@127.0.0.1:5984"

Revision history for this message
RNZ (renoizer) wrote :

Eric - how about couchbase - http://www.couchbase.com/downloads ?

RNZ (renoizer)
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in couchdb (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.