You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2019/07/17 00:46:04 UTC

[GitHub] [couchdb] niconorsk opened a new issue #2073: CouchDB 2.0: Race condition when creating/deleting database

niconorsk opened a new issue #2073: CouchDB 2.0: Race condition when creating/deleting database
URL: https://github.com/apache/couchdb/issues/2073
 
 
   Reposting of https://issues.apache.org/jira/browse/COUCHDB-3034 as this is still an issue
   
   ## Description
   
   I've noticed that CouchDB 2.0 (master) occasionally returns 500 errors when multiple clients attempt to PUT or DELETE the same database concurrently. 
   
   ## Steps to Reproduce
   
   This is reproducible by running multiple instances of following script in parallel against an n=1 (single node) cluster:
   ```
   #!/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
   ```
   This generates output along the lines of:
   ```
   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
   ```
   ## Your Environment
   
   * CouchDB Version used: 2.3.1 installed from RPM
   * Browser name and version: curl
   * Operating System and version: CentOS 7.5
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services