Public bug reported:

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://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'

** Affects: couchdb (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: 1.0.1 1.1.0 couchdb replication version

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/803567

Title:
  1.0.1 - replication broken and need new version of couchdb 1.1.0

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/couchdb/+bug/803567/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to