Eric Avdey created COUCHDB-2785: ----------------------------------- Summary: Call to filtered _changes crashes on non-coordinator nodes Key: COUCHDB-2785 URL: https://issues.apache.org/jira/browse/COUCHDB-2785 Project: CouchDB Issue Type: Bug Security Level: public (Regular issues) Reporter: Eric Avdey
A call to {{_changes}} end-point with {{filter}} parameter crashes on non-coordinator nodes with : {code:title=node.log} 2015-08-24 10:21:48.051 [error] <0.16621.0>@couch_log:error:35 rexi_server error:{case_clause,{error,einval}} [{mochiweb_request,get,2},{couch_httpd_external,json_req_obj,3},{couch_changes,filter,3},{fabric_rpc,changes_enumerator,2},{couch_btree,stream_kv_node2,8},{couch_btree,stream_kp_node,8},{couch_btree,fold,4},{couch_db,changes_since,5}] {code} The root cause is that in a clustered environment the coordinator node, i.e. the node that received HTTP request, passes its {{mochi_req}} record to the secondary nodes. Filter parameter for {{_changes}} expects nodes to pull peer from the request's record and that crashing on the secondary nodes since a socket in the request is foreign for them. The case is not reliably reproducible, because in majority of the situations the coordinator node gets the changes response and cancels the fabric call before remote nodes start to execute it. -- This message was sent by Atlassian JIRA (v6.3.4#6332)