You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2015/08/24 16:05:46 UTC

[jira] [Commented] (COUCHDB-2785) Call to filtered _changes crashes on non-coordinator nodes

    [ https://issues.apache.org/jira/browse/COUCHDB-2785?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14709338#comment-14709338 ] 

ASF GitHub Bot commented on COUCHDB-2785:
-----------------------------------------

GitHub user eiri opened a pull request:

    https://github.com/apache/couchdb-couch/pull/91

    Fix crashing filtered _changes request

    A filtered call to _changes end-point prompts a node to
    pull a peer from the received mochi request record.
    This is crashing on the secondary nodes in a clustered
    environment since the peer call made on a socket
    that is not original for them.
    
    The fix makes use of the fact that by the time of the request
    the peer already got resolved on the coordinator node and
    passed along as a part of #http record.
    
    This closes the case COUCHDB-2785

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/cloudant/couchdb-couch fix-filtered-changes

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/couchdb-couch/pull/91.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #91
    
----
commit f6b69a925610ea0295e299a4186df43cd64cf75e
Author: Eric Avdey <ei...@eiri.ca>
Date:   2015-08-24T13:55:30Z

    Fix crashing filtered _changes request
    
    A filtered call to _changes end-point prompts a node to
    pull a peer from the received mochi request record.
    This is crashing on the secondary nodes in a clustered
    environment since the peer call made on a socket
    that is not original for them.
    
    The fix makes use of the fact that by the time of the request
    the peer already got resolved on the coordinator node and
    passed along as a part of #http record.
    
    This closes the case COUCHDB-2785

----


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