couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Newson <rnew...@apache.org>
Subject Re: Strange problem: Cannot create non existing DB because of "The database could not be created, the file already exists."
Date Sat, 17 Mar 2012 18:38:07 GMT
Your own log shows these events (in this order);

'DELETE' /couch_unit_test_1332002868099_16584 404
'PUT' /couch_unit_test_1332002868099_16584 201
'PUT' /couch_unit_test_1332002868099_16584 412

Your first put creates the db, your second gives the (expected) error.

B.

On 17 March 2012 17:08, Johannes Schneider <mailings@cedarsoft.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi guys,
>
> I have a big problem. My unit tests fail randomly (about 5% of the time).
> For each unit test I create a DB and delete it afterwards.
> To be sure (maybe that causes the problem) I delete the DB before the
> unit tests. It should not exist - but who knows....
>
>
> In short:
>
> - - try to delete DB (expecting 404)
> - - creating DB
>
> The following log shows the problem. DB
> "/couch_unit_test_1332002868099_16584"  -at the bottom.
>
> I cannot delete the DB --> I get 404 as expected.
> But the very next put to exactly that db fails with 412.
>
> I am sure that there are no other processes that access the DB.
> The unit tests are always run within the same order. The DB names are
> automatically generated names - based on the current time and a random
> number.
> But nearly all of the time the same two unit tests fail. But not the
> first - there are at least 20 DB creations and deletions before...
>
>
> Any ideas?
>
>
> CouchdDB-Version: 1.0.1
>
>
>
>
> [Sat, 17 Mar 2012 16:47:48 GMT] [info] [<0.10429.2>] 127.0.0.1 - -
> 'GET' /couch_unit_test_1332002867944_1665/_design/exchange 404
>
> [Sat, 17 Mar 2012 16:47:48 GMT] [debug] [<0.10429.2>] httpd 404 error
> response:
>  {"error":"not_found","reason":"missing"}
>
>
> [Sat, 17 Mar 2012 16:47:48 GMT] [debug] [<0.10430.2>] 'PUT'
> /couch_unit_test_1332002867944_1665/_design/exchange {1,1}
> Headers: [{'Accept',"text/html, image/gif, image/jpeg, *; q=.2, */*;
> q=.2"},
>          {'Connection',"keep-alive"},
>          {'Content-Length',"376"},
>          {'Content-Type',"text/plain"},
>          {'Host',"localhost:5984"},
>          {'User-Agent',"Java/1.7.0_02"}]
>
> [Sat, 17 Mar 2012 16:47:48 GMT] [debug] [<0.10430.2>] OAuth Params: []
>
> [Sat, 17 Mar 2012 16:47:48 GMT] [info] [<0.10430.2>] 127.0.0.1 - -
> 'PUT' /couch_unit_test_1332002867944_1665/_design/exchange 201
>
> [Sat, 17 Mar 2012 16:47:48 GMT] [debug] [<0.10431.2>] 'DELETE'
> /couch_unit_test_1332002867944_1665 {1,1}
> Headers: [{'Accept',"text/html, image/gif, image/jpeg, *; q=.2, */*;
> q=.2"},
>          {'Connection',"keep-alive"},
>          {'Host',"localhost:5984"},
>          {'User-Agent',"Java/1.7.0_02"}]
>
> [Sat, 17 Mar 2012 16:47:48 GMT] [debug] [<0.10431.2>] OAuth Params: []
>
> [Sat, 17 Mar 2012 16:47:48 GMT] [info] [<0.10431.2>] 127.0.0.1 - -
> 'DELETE' /couch_unit_test_1332002867944_1665 200
>
> [Sat, 17 Mar 2012 16:47:48 GMT] [debug] [<0.10242.2>] 'DELETE'
> /couch_unit_test_1332002868099_16584 {1,1}
> Headers: [{'Accept',"text/html, image/gif, image/jpeg, *; q=.2, */*;
> q=.2"},
>          {'Connection',"keep-alive"},
>          {'Host',"localhost:5984"},
>          {'User-Agent',"Java/1.7.0_02"}]
>
> [Sat, 17 Mar 2012 16:47:48 GMT] [debug] [<0.10242.2>] OAuth Params: []
>
> [Sat, 17 Mar 2012 16:47:48 GMT] [debug] [<0.10242.2>] Minor error in
> HTTP request: not_found
>
> [Sat, 17 Mar 2012 16:47:48 GMT] [debug] [<0.10242.2>] Stacktrace:
> [{couch_httpd_db,delete_db_req,2},
>             {couch_httpd,handle_request_int,5},
>             {mochiweb_http,headers,5},
>             {proc_lib,init_p_do_apply,3}]
>
> [Sat, 17 Mar 2012 16:47:48 GMT] [info] [<0.10242.2>] 127.0.0.1 - -
> 'DELETE' /couch_unit_test_1332002868099_16584 404
>
> [Sat, 17 Mar 2012 16:47:48 GMT] [debug] [<0.10242.2>] httpd 404 error
> response:
>  {"error":"not_found","reason":"missing"}
>
>
> [Sat, 17 Mar 2012 16:47:48 GMT] [debug] [<0.10242.2>] 'PUT'
> /couch_unit_test_1332002868099_16584 {1,1}
> Headers: [{'Accept',"text/html, image/gif, image/jpeg, *; q=.2, */*;
> q=.2"},
>          {'Connection',"keep-alive"},
>          {'Host',"localhost:5984"},
>          {'User-Agent',"Java/1.7.0_02"}]
>
> [Sat, 17 Mar 2012 16:47:48 GMT] [debug] [<0.10242.2>] OAuth Params: []
>
> [Sat, 17 Mar 2012 16:47:48 GMT] [debug] [<0.10432.2>] 'PUT'
> /couch_unit_test_1332002868099_16584 {1,1}
> Headers: [{'Accept',"text/html, image/gif, image/jpeg, *; q=.2, */*;
> q=.2"},
>          {'Connection',"keep-alive"},
>          {'Host',"localhost:5984"},
>          {'User-Agent',"Java/1.7.0_02"}]
>
> [Sat, 17 Mar 2012 16:47:48 GMT] [debug] [<0.10432.2>] OAuth Params: []
>
> [Sat, 17 Mar 2012 16:47:48 GMT] [debug] [<0.10432.2>] Minor error in
> HTTP request: file_exists
>
> [Sat, 17 Mar 2012 16:47:48 GMT] [info] [<0.10242.2>] 127.0.0.1 - -
> 'PUT' /couch_unit_test_1332002868099_16584 201
>
> [Sat, 17 Mar 2012 16:47:48 GMT] [debug] [<0.10432.2>] Stacktrace:
> [{couch_httpd_db,create_db_req,2},
>             {couch_httpd,handle_request_int,5},
>             {mochiweb_http,headers,5},
>             {proc_lib,init_p_do_apply,3}]
>
> [Sat, 17 Mar 2012 16:47:48 GMT] [info] [<0.10432.2>] 127.0.0.1 - -
> 'PUT' /couch_unit_test_1332002868099_16584 412
>
> [Sat, 17 Mar 2012 16:47:48 GMT] [debug] [<0.10432.2>] httpd 412 error
> response:
>  {"error":"file_exists","reason":"The database could not be created,
> the file already exists."}
>
>
> [Sat, 17 Mar 2012 16:47:48 GMT] [debug] [<0.10432.2>] 'GET'
> /couch_unit_test_1332002868099_16584 {1,1}
> Headers: [{'Accept',"text/html, image/gif, image/jpeg, *; q=.2, */*;
> q=.2"},
>          {'Connection',"keep-alive"},
>          {'Host',"localhost:5984"},
>          {'User-Agent',"Java/1.7.0_02"}]
>
> [Sat, 17 Mar 2012 16:47:48 GMT] [debug] [<0.10432.2>] OAuth Params: []
>
> [Sat, 17 Mar 2012 16:47:48 GMT] [info] [<0.10432.2>] 127.0.0.1 - -
> 'GET' /couch_unit_test_1332002868099_16584 200
>
> - --
> Johannes Schneider - blog.cedarsoft.com
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (GNU/Linux)
>
> iQEcBAEBAgAGBQJPZMUJAAoJEAytD9R7Qv6dOuwH/1vY7VKQzd6JAgpKMe0ZSfqT
> 2vM09H5KIzeAofQbvocZa8T/8hUmtMqHykTvePtxzAyRjcoo0XGqMvwCMiUE3Esf
> Fi9XE9BlJCIJyDnVyfW2DH+DKBg4cjoVA0ByRTJdqwycsEnGcU2b0M24F4uWbYzu
> qCj69Xoa0RBTGeBOTPgoj4Fx4X7sVyiXTmqx13MejQaPifu0La3qL3MKNcfy3cPi
> FtsYm3dT7lJNpf1AqMqkS+yAVRL1JXjunxdWevIOPql0bjMGUHgecI9e4wVhumBc
> tkMuGQUOYki6gufzz7qzZAmErZqFOLM3BPvEqlbJ6QKdQl1g6jQ9ipTApcUmAy8=
> =7pQ2
> -----END PGP SIGNATURE-----

Mime
View raw message