wohali opened a new issue #502: all_dbs_active error crashes rexi, returns 500 URL: https://github.com/apache/couchdb/issues/502 I'm fixing up the `stats.js` test, which intentionally sets max_dbs_open low. When an operation (here, a doc creation) hits `all_dbs_active`, rexi crashes with a `badmatch`, which results in a 500 being returned for the PUT operation. Log: ``` [notice] 2017-05-02T21:48:23.896392Z [email protected] <0.310.0> e0d886f91b 127.0.0.1:15984 127.0.0.1 undefined GET / 200 ok 0 [notice] 2017-05-02T21:48:23.896987Z [email protected] <0.310.0> 71587dc11d 127.0.0.1:15984 127.0.0.1 undefined GET /_membership 200 ok 0 [notice] 2017-05-02T21:48:23.934277Z [email protected] <0.69.0> -------- config: [couchdb] max_dbs_open set to 5 for reason nil [notice] 2017-05-02T21:48:23.934653Z [email protected] <0.310.0> b0c18fcc87 127.0.0.1:15984 127.0.0.1 undefined PUT /_node/[email protected]/_config/couchdb/max_dbs_open 200 ok 37 [notice] 2017-05-02T21:48:23.950708Z [email protected] <0.310.0> d7719381c7 127.0.0.1:15984 127.0.0.1 undefined GET /_node/[email protected]/_stats/couchdb/open_databases?flush=true 200 ok 16 [notice] 2017-05-02T21:48:23.967092Z [email protected] <0.310.0> 8257556df3 127.0.0.1:15984 127.0.0.1 undefined GET /_node/[email protected]/_stats/couchdb/open_os_files?flush=true 200 ok 16 [error] 2017-05-02T21:48:23.968115Z [email protected] <0.310.0> 8541329306 Request to create N=3 DB but only 1 node(s) [notice] 2017-05-02T21:48:24.147960Z [email protected] <0.310.0> 8541329306 127.0.0.1:15984 127.0.0.1 undefined PUT /test_suite_db_ougfuqun/ 201 ok 180 [error] 2017-05-02T21:48:24.215579Z [email protected] <0.485.0> -------- rexi_server error:{badmatch,{error,all_dbs_active}} [{fabric_rpc,all_docs,3,[{file,"src/fabric_rpc.erl"},{line,100}]},{rexi_server,init_p,3,[{file,"src/rexi_server.erl"},{line,139}]}] [error] 2017-05-02T21:48:24.215937Z [email protected] <0.486.0> -------- rexi_server error:{badmatch,{error,all_dbs_active}} [{fabric_rpc,all_docs,3,[{file,"src/fabric_rpc.erl"},{line,100}]},{rexi_server,init_p,3,[{file,"src/rexi_server.erl"},{line,139}]}] [error] 2017-05-02T21:48:24.216063Z [email protected] <0.487.0> -------- rexi_server error:{badmatch,{error,all_dbs_active}} [{fabric_rpc,all_docs,3,[{file,"src/fabric_rpc.erl"},{line,100}]},{rexi_server,init_p,3,[{file,"src/rexi_server.erl"},{line,139}]}] [error] 2017-05-02T21:48:24.216799Z [email protected] emulator -------- Error in process <0.479.0> on node '[email protected]' with exit value: {{badmatch,{error,{badmatch,{error,all_dbs_active},[{fabric_rpc,all_docs,3,[{file,"src/fabric_rpc.erl"},{line,100}]},{rexi_server,init_p,3,[{file,"src/rexi_server.erl"},{line,139}]}]}}},[{ddoc_cache_opener,recover_validation_funs... [error] 2017-05-02T21:48:24.216898Z [email protected] emulator -------- Error in process <0.478.0> on node '[email protected]' with exit value: {{case_clause,{error,{{badmatch,{error,{badmatch,{error,all_dbs_active},[{fabric_rpc,all_docs,3,[{file,"src/fabric_rpc.erl"},{line,100}]},{rexi_server,init_p,3,[{file,"src/rexi_server.erl"},{line,139}]}]}}},[{ddoc_cache_opener... [error] 2017-05-02T21:48:24.217563Z [email protected] <0.476.0> -------- could not load validation funs {{case_clause,{error,{{badmatch,{error,{badmatch,{error,all_dbs_active},[{fabric_rpc,all_docs,3,[{file,"src/fabric_rpc.erl"},{line,100}]},{rexi_server,init_p,3,[{file,"src/rexi_server.erl"},{line,139}]}]}}},[{ddoc_cache_opener,recover_validation_funs,1,[{file,"src/ddoc_cache_opener.erl"},{line,127}]},{ddoc_cache_opener,fetch_doc_data,1,[{file,"src/ddoc_cache_opener.erl"},{line,240}]}]}}},[{ddoc_cache_opener,handle_open_response,1,[{file,"src/ddoc_cache_opener.erl"},{line,282}]},{couch_db,'-load_validation_funs/1-fun-0-',1,[{file,"src/couch_db.erl"},{line,659}]}]} [notice] 2017-05-02T21:48:24.219008Z [email protected] <0.310.0> a4b1d64a3e 127.0.0.1:15984 127.0.0.1 undefined PUT /test_suite_db_ougfuqun/0 500 ok 68 [error] 2017-05-02T21:48:24.224920Z [email protected] <0.489.0> -------- Could not open file /home/joant/couchdb/dev/lib/node1/data/shards/40000000-5fffffff/test_suite_db_ougfuqun.1493761703.couch: no such file or directory [info] 2017-05-02T21:48:24.225349Z [email protected] <0.217.0> -------- open_result error {not_found,no_db_file} for shards/40000000-5fffffff/test_suite_db_ougfuqun.1493761703 [warning] 2017-05-02T21:48:24.225476Z [email protected] <0.483.0> -------- creating missing database: shards/40000000-5fffffff/test_suite_db_ougfuqun.1493761703 ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
With regards, Apache Git Services
