obi458 commented on issue #1182: fixed race is_idle
URL: https://github.com/apache/couchdb/pull/1182#issuecomment-368998747
 
 
   The motivation we thinking about the problem is: a lot of noproc errors in 
changes!
   Following by a lot of timeouts!
   Maybe we could better handle the badmatch!
   
   ```
   [error] 2018-02-23T18:55:04.251497Z [email protected] <0.12749.108> 
8647c35089 rexi_server: from: [email protected](<0.960.81>) mfa: 
fabric_rpc:changes/3 error:{badmatch,{'EXIT',noproc}} 
[{couch_file,pread_binary,2,[{file,"src/couch_file.erl"},{line,169}]},{couch_file,pread_term,2,[{file,"src/couch_file.erl"},{line,157}]},{couch_btree,get_node,2,[{file,"src/couch_btree.erl"},{line,434}]},{couch_btree,reduce_stream_node,11,[{file,"src/couch_btree.erl"},{line,619}]},{couch_btree,fold_reduce,4,[{file,"src/couch_btree.erl"},{line,81}]},{couch_db,count_changes_since,2,[{file,"src/couch_db.erl"},{line,1407}]},{fabric_rpc,changes,4,[{file,"src/fabric_rpc.erl"},{line,80}]},{rexi_server,init_p,3,[{file,"src/rexi_server.erl"},{line,139}]}]
   [error] 2018-02-23T19:11:26.204435Z [email protected] <0.12625.108> 
8647c35089 rexi_server: from: [email protected](<0.960.81>) mfa: 
fabric_rpc:changes/3 exit:timeout 
[{rexi,init_stream,1,[{file,"src/rexi.erl"},{line,256}]},{rexi,stream_last,2,[{file,"src/rexi.erl"},{line,224}]},{fabric_rpc,changes,4,[{file,"src/fabric_rpc.erl"},{line,86}]},{rexi_server,init_p,3,[{file,"src/rexi_server.erl"},{line,139}]}]
   [error] 2018-02-23T19:11:26.206475Z [email protected] <0.12799.108> 
8647c35089 rexi_server: from: [email protected](<0.960.81>) mfa: 
fabric_rpc:changes/3 exit:timeout 
[{rexi,init_stream,1,[{file,"src/rexi.erl"},{line,256}]},{rexi,stream_last,2,[{file,"src/rexi.erl"},{line,224}]},{fabric_rpc,changes,4,[{file,"src/fabric_rpc.erl"},{line,86}]},{rexi_server,init_p,3,[{file,"src/rexi_server.erl"},{line,139}]}]
   [error] 2018-02-23T19:11:26.206597Z [email protected] <0.12936.108> 
8647c35089 rexi_server: from: [email protected](<0.960.81>) mfa: 
fabric_rpc:changes/3 exit:timeout 
[{rexi,init_stream,1,[{file,"src/rexi.erl"},{line,256}]},{rexi,stream_last,2,[{file,"src/rexi.erl"},{line,224}]},{fabric_rpc,changes,4,[{file,"src/fabric_rpc.erl"},{line,86}]},{rexi_server,init_p,3,[{file,"src/rexi_server.erl"},{line,139}]}]
   ```
   This comes from:
   
   ioq:
   ```
   submit_request(#request{}=Request, #state{}=State) ->
       Ref = erlang:monitor(process, Request#request.fd), % fd is dead!!!
   ```
   
   ```
   handle_info({'DOWN', Ref, _, _, Reason}, State) ->
       case lists:keytake(Ref, #request.ref, State#state.running) of
           {value, Request, Remaining} ->
               gen_server:reply(Request#request.from, {'EXIT', Reason}), % 
Reason is noproc
               {noreply, State#state{running=Remaining}, 0};
           false ->
               {noreply, State, 0}
       end;
   ```

----------------------------------------------------------------
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

Reply via email to