starting opened a new issue #1001: [1.6.x][Compaction] Random compaction failures URL: https://github.com/apache/couchdb/issues/1001 <!--- Provide a general summary of the issue in the Title above --> ## Expected Behavior 1. Compaction completes without any error. ## Current Behavior 1. Temporary file is not deleted. 2. couch.log has following stack trace `[Thu, 17 Aug 2017 11:14:30 GMT] [error] [emulator] Error in process <0.12887.1> with exit value: {function_clause,[{couch_db_updater,'-copy_docs/4-fun-3-',[not_found],[{file,"couch_db_updater.erl"},{line,857}]},{lists,map,2,[{file,"lists.erl"},{line,1224}]},{lists,map,2,[{file,"lists.erl"},{line,1224}]},{couch_db_updater,copy_docs... [Thu, 17 Aug 2017 11:14:30 GMT] [error] [<0.5045.1>] ** Generic server <0.5045.1> terminating ** Last message in was {'EXIT',<0.12887.1>, {function_clause, [{couch_db_updater,'-copy_docs/4-fun-3-', [not_found], [{file,"couch_db_updater.erl"}, {line,857}]}, {lists,map,2,[{file,"lists.erl"},{line,1224}]}, {lists,map,2,[{file,"lists.erl"},{line,1224}]}, {couch_db_updater,copy_docs,4, [{file,"couch_db_updater.erl"}, {line,856}]}, {couch_db_updater,'-copy_compact/3-fun-0-',7, [{file,"couch_db_updater.erl"}, {line,917}]}, {couch_btree,stream_kv_node2,8, [{file,"couch_btree.erl"},{line,708}]}, {couch_btree,stream_kp_node,7, [{file,"couch_btree.erl"},{line,637}]}, {couch_btree,fold,4, [{file,"couch_btree.erl"},{line,159}]}]}} ** When Server state == {db,<0.5044.1>,<0.5045.1>,<0.12887.1>, <<"1502965878196162">>,<0.5046.1>,<0.5042.1>, <0.5048.1>, {db_header,6,885493,0, {6119000697,{39549,257,136740145},7541350}, {6119002975,42754,3498231}, {6119018635,[],8490}, 286,6117892339,5154762888,1000}, 885493, {btree,<0.5042.1>, {6119000697,{39549,257,136740145},7541350}, #Fun<couch_db_updater.10.75275056>, #Fun<couch_db_updater.11.75275056>, #Fun<couch_btree.5.71351651>, #Fun<couch_db_updater.12.75275056>,snappy}, {btree,<0.5042.1>, {6119002975,42754,3498231}, #Fun<couch_db_updater.13.75275056>, #Fun<couch_db_updater.14.75275056>, #Fun<couch_btree.5.71351651>, #Fun<couch_db_updater.15.75275056>,snappy}, {btree,<0.5042.1>, {6119018635,[],8490}, #Fun<couch_btree.3.71351651>, #Fun<couch_btree.4.71351651>, #Fun<couch_btree.5.71351651>,nil,snappy}, 885493,<<"c0050-10236326">>, "/var/lib/couchdb/c0050-10236326.couch", [#Fun<couch_doc.8.24157724>], [{<<"admins">>, {[{<<"names">>, [<<"C0050-10236326SYNCUSER57DF65FA">>]}, {<<"roles">>,[<<"admin">>]}]}}, {<<"readers">>, {[{<<"names">>, [<<"C0050-10236326SYNCUSER57DF65FA">>]}, {<<"roles">>,[<<"reader">>]}]}}], 5154762888, {user_ctx,null,[],undefined}, nil,1000, [before_header,after_header,on_file_open], [{user_ctx, {user_ctx, <<"C0050-10236326SYNCUSER57DF65FA">>, [<<"admin">>], <<"{couch_httpd_auth, default_authentication_handler}">>}}], snappy,nil,nil} ** Reason for termination == ** {function_clause, [{couch_db_updater,'-copy_docs/4-fun-3-', [not_found], [{file,"couch_db_updater.erl"},{line,857}]}, {lists,map,2,[{file,"lists.erl"},{line,1224}]}, {lists,map,2,[{file,"lists.erl"},{line,1224}]}, {couch_db_updater,copy_docs,4, [{file,"couch_db_updater.erl"},{line,856}]}, {couch_db_updater,'-copy_compact/3-fun-0-',7, [{file,"couch_db_updater.erl"},{line,917}]}, {couch_btree,stream_kv_node2,8,[{file,"couch_btree.erl"},{line,708}]}, {couch_btree,stream_kp_node,7,[{file,"couch_btree.erl"},{line,637}]}, {couch_btree,fold,4,[{file,"couch_btree.erl"},{line,159}]}]} [Thu, 17 Aug 2017 11:14:30 GMT] [error] [<0.5045.1>] {error_report,<0.31.0>, {<0.5045.1>,crash_report, [[{initial_call, {couch_db_updater,init,['Argument__1']}}, {pid,<0.5045.1>}, {registered_name,[]}, {error_info, {exit, {function_clause, [{couch_db_updater,'-copy_docs/4-fun-3-', [not_found], [{file,"couch_db_updater.erl"},{line,857}]}, {lists,map,2,[{file,"lists.erl"},{line,1224}]}, {lists,map,2,[{file,"lists.erl"},{line,1224}]}, {couch_db_updater,copy_docs,4, [{file,"couch_db_updater.erl"},{line,856}]}, {couch_db_updater,'-copy_compact/3-fun-0-',7, [{file,"couch_db_updater.erl"},{line,917}]}, {couch_btree,stream_kv_node2,8, [{file,"couch_btree.erl"},{line,708}]}, {couch_btree,stream_kp_node,7, [{file,"couch_btree.erl"},{line,637}]}, {couch_btree,fold,4, [{file,"couch_btree.erl"},{line,159}]}]}, [{gen_server,terminate,6, [{file,"gen_server.erl"},{line,744}]}, {proc_lib,init_p_do_apply,3, [{file,"proc_lib.erl"},{line,239}]}]}}, {ancestors,[<0.5044.1>,<0.5041.1>]}, {messages,[]}, {links,[<0.5044.1>]}, {dictionary,[]}, {trap_exit,true}, {status,running}, {heap_size,75113}, {stack_size,27}, {reductions,156752}], []]}}` ## Possible Solution 1. Document purge delete the document from the db, but not from index. 2. Discard any document that is not in the db but only in the main index file. 3. Create a new database replicating from the current db. ## Steps to Reproduce (for bugs) 1. Exact steps are unknown. ## Context DB is growing due to compaction failures. ## Your Environment <!--- Include as many relevant details about the environment you experienced the bug in --> * Version used: 1.5 and 1.6 * Browser Name and version: * Operating System and version (desktop or mobile): Ubuntu 16.04 * Link to your project: -
---------------------------------------------------------------- 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
