Will Holley created COUCHDB-3034:
------------------------------------
Summary: CouchDB 2.0: Race condition when creating/deleting
database
Key: COUCHDB-3034
URL: https://issues.apache.org/jira/browse/COUCHDB-3034
Project: CouchDB
Issue Type: Bug
Reporter: Will Holley
I've noticed that CouchDB 2.0 (master) occasionally returns 500 errors when
multiple clients attempt to PUT or DELETE the same database concurrently. This
is reproducible by running multiple instances of following script in parallel
against an n=1 (single node) cluster:
{code}
#!/bin/bash
for i in `seq 1 2000`;
do
printf '\nPUT: '
curl -XPUT 'http://localhost:15984/testdb' -w "%{http_code}\\n"
printf '\nDELETE: '
curl -XDELETE 'http://localhost:15984/testdb' -w "%{http_code}\\n"
done
{code}
This generates output along the lines of:
{code}
PUT: {"ok":true}
201
DELETE: {"ok":true}
200
PUT: {"error":"error","reason":"internal_server_error"}
500
DELETE: {"error":"not_found","reason":"Database does not exist."}
404
PUT: {"error":"file_exists","reason":"The database could not be created, the
file already exists."}
412
DELETE: {"ok":true}
200
PUT: {"error":"file_exists","reason":"The database could not be created, the
file already exists."}
412
DELETE: {"ok":true}
200
PUT: {"ok":true}
201
DELETE: {"ok":true}
200
{code}
I can't reproduce the error against CouchDB 1.6 or CouchDB master on port 15986
(bypassing the clustering).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)