[jira] [Commented] (COUCHDB-3149) Exception written to the log if db deleted while there is a change feed running
[ https://issues.apache.org/jira/browse/COUCHDB-3149?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15495923#comment-15495923 ] Robert Newson commented on COUCHDB-3149: ignore that last. I had tried just doing `stop` instead of `{stop, St}` and that's not correct. Your fix works correctly, clean termination of changes feed on db delete and no spam in the logs +1 > Exception written to the log if db deleted while there is a change feed > running > --- > > Key: COUCHDB-3149 > URL: https://issues.apache.org/jira/browse/COUCHDB-3149 > Project: CouchDB > Issue Type: Bug >Reporter: Nick Vatamaniuc > > {code} > [info] 2016-09-14T20:08:23.217251Z node1@127.0.0.1 <0.23485.0> ea02496172 > ea02496172 127.0.0.1 localhost:15984 DELETE /d1 200 ok 46 > [error] 2016-09-14T20:08:23.221676Z node1@127.0.0.1 <0.22945.0> > rexi_server > error:{'EXIT',{{stop,{cb_state,<0.22937.0>,#Ref<0.0.1.15627>,true}},[{couch_event_listener_mfa,handle_event,3,[{file,"src/couch_event_listener_mfa.erl"},{line,91}]},{couch_event_listener,do_event,3,[{file,"src/couch_event_listener.erl"},{line,142}]},{rexi_server,init_p,3,[{file,"src/rexi_server.erl" > },{line,139}]}]}} > [{couch_event_listener,do_event,3,[{file,"src/couch_event_listener.erl"},{line,150}]},{rexi_server,init_p,3,[{file,"src/rexi_server.erl"},{line,139}]}] > [info] 2016-09-14T20:08:23.222174Z node1@127.0.0.1 <0.22898.0> 549ae68ef1 > 549ae68ef1 127.0.0.1 localhost:15984 GET /d1/_changes?feed=longpoll 200 ok > 32901 > {code} > Appears in the log if a database gets deleted while there is a change feed > running. Both longpoll or continuous seem to trigger the behavior. > Exception above in couch_event_listener_mfa:handle_event comes from > https://github.com/apache/couchdb-couch-event/blob/master/src/couch_event_listener_mfa.erl#L91 > which, in turn comes from fabric_db_update_listener handle_db_event returning > \{stop, St\} in: > https://github.com/apache/couchdb-fabric/blob/master/src/fabric_db_update_listener.erl#L87 > It seems couch_event_listerner_mfa:handle_event doesn’t handle \{stop, St\} > only, \{ok, NewState\} or just stop or it raises an exception. > I tried to replace \{stop, St\} with \{ok, St\} and then with stop. But in > both cases change feeds never stopped. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (COUCHDB-3149) Exception written to the log if db deleted while there is a change feed running
[ https://issues.apache.org/jira/browse/COUCHDB-3149?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15495913#comment-15495913 ] Robert Newson commented on COUCHDB-3149: I can also get still get this sometimes, with my previous patch applied; HTTP/1.1 404 Object Not Found Cache-Control: must-revalidate Content-Length: 58 Content-Type: application/json Date: Fri, 16 Sep 2016 10:05:48 GMT Server: CouchDB/2.0.0-9add02f (Erlang OTP/18) X-Couch-Request-ID: 08ff181b7a X-CouchDB-Body-Time: 0 {"error":"not_found","reason":"Database does not exist."} > Exception written to the log if db deleted while there is a change feed > running > --- > > Key: COUCHDB-3149 > URL: https://issues.apache.org/jira/browse/COUCHDB-3149 > Project: CouchDB > Issue Type: Bug >Reporter: Nick Vatamaniuc > > {code} > [info] 2016-09-14T20:08:23.217251Z node1@127.0.0.1 <0.23485.0> ea02496172 > ea02496172 127.0.0.1 localhost:15984 DELETE /d1 200 ok 46 > [error] 2016-09-14T20:08:23.221676Z node1@127.0.0.1 <0.22945.0> > rexi_server > error:{'EXIT',{{stop,{cb_state,<0.22937.0>,#Ref<0.0.1.15627>,true}},[{couch_event_listener_mfa,handle_event,3,[{file,"src/couch_event_listener_mfa.erl"},{line,91}]},{couch_event_listener,do_event,3,[{file,"src/couch_event_listener.erl"},{line,142}]},{rexi_server,init_p,3,[{file,"src/rexi_server.erl" > },{line,139}]}]}} > [{couch_event_listener,do_event,3,[{file,"src/couch_event_listener.erl"},{line,150}]},{rexi_server,init_p,3,[{file,"src/rexi_server.erl"},{line,139}]}] > [info] 2016-09-14T20:08:23.222174Z node1@127.0.0.1 <0.22898.0> 549ae68ef1 > 549ae68ef1 127.0.0.1 localhost:15984 GET /d1/_changes?feed=longpoll 200 ok > 32901 > {code} > Appears in the log if a database gets deleted while there is a change feed > running. Both longpoll or continuous seem to trigger the behavior. > Exception above in couch_event_listener_mfa:handle_event comes from > https://github.com/apache/couchdb-couch-event/blob/master/src/couch_event_listener_mfa.erl#L91 > which, in turn comes from fabric_db_update_listener handle_db_event returning > \{stop, St\} in: > https://github.com/apache/couchdb-fabric/blob/master/src/fabric_db_update_listener.erl#L87 > It seems couch_event_listerner_mfa:handle_event doesn’t handle \{stop, St\} > only, \{ok, NewState\} or just stop or it raises an exception. > I tried to replace \{stop, St\} with \{ok, St\} and then with stop. But in > both cases change feeds never stopped. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (COUCHDB-3149) Exception written to the log if db deleted while there is a change feed running
[ https://issues.apache.org/jira/browse/COUCHDB-3149?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15494259#comment-15494259 ] ASF GitHub Bot commented on COUCHDB-3149: - Github user asfgit closed the pull request at: https://github.com/apache/couchdb-fabric/pull/69 > Exception written to the log if db deleted while there is a change feed > running > --- > > Key: COUCHDB-3149 > URL: https://issues.apache.org/jira/browse/COUCHDB-3149 > Project: CouchDB > Issue Type: Bug >Reporter: Nick Vatamaniuc > > {code} > [info] 2016-09-14T20:08:23.217251Z node1@127.0.0.1 <0.23485.0> ea02496172 > ea02496172 127.0.0.1 localhost:15984 DELETE /d1 200 ok 46 > [error] 2016-09-14T20:08:23.221676Z node1@127.0.0.1 <0.22945.0> > rexi_server > error:{'EXIT',{{stop,{cb_state,<0.22937.0>,#Ref<0.0.1.15627>,true}},[{couch_event_listener_mfa,handle_event,3,[{file,"src/couch_event_listener_mfa.erl"},{line,91}]},{couch_event_listener,do_event,3,[{file,"src/couch_event_listener.erl"},{line,142}]},{rexi_server,init_p,3,[{file,"src/rexi_server.erl" > },{line,139}]}]}} > [{couch_event_listener,do_event,3,[{file,"src/couch_event_listener.erl"},{line,150}]},{rexi_server,init_p,3,[{file,"src/rexi_server.erl"},{line,139}]}] > [info] 2016-09-14T20:08:23.222174Z node1@127.0.0.1 <0.22898.0> 549ae68ef1 > 549ae68ef1 127.0.0.1 localhost:15984 GET /d1/_changes?feed=longpoll 200 ok > 32901 > {code} > Appears in the log if a database gets deleted while there is a change feed > running. Both longpoll or continuous seem to trigger the behavior. > Exception above in couch_event_listener_mfa:handle_event comes from > https://github.com/apache/couchdb-couch-event/blob/master/src/couch_event_listener_mfa.erl#L91 > which, in turn comes from fabric_db_update_listener handle_db_event returning > \{stop, St\} in: > https://github.com/apache/couchdb-fabric/blob/master/src/fabric_db_update_listener.erl#L87 > It seems couch_event_listerner_mfa:handle_event doesn’t handle \{stop, St\} > only, \{ok, NewState\} or just stop or it raises an exception. > I tried to replace \{stop, St\} with \{ok, St\} and then with stop. But in > both cases change feeds never stopped. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (COUCHDB-3149) Exception written to the log if db deleted while there is a change feed running
[ https://issues.apache.org/jira/browse/COUCHDB-3149?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15494257#comment-15494257 ] ASF subversion and git services commented on COUCHDB-3149: -- Commit b5340347294ac8047619df23b1586774d22e5b71 in couchdb-fabric's branch refs/heads/master from [~vatamane] [ https://git-wip-us.apache.org/repos/asf?p=couchdb-fabric.git;h=b534034 ] Avoid throwing exception when deleting db in db updater listener Handle db deletion explicitly. Previously handle_db_event callback returned `{stop, St}`. That return value was not handled by the caller, instead it resulted in it being used as reason in an erlang:error, which then ended up in the log. Jira: COUCHDB-3149 > Exception written to the log if db deleted while there is a change feed > running > --- > > Key: COUCHDB-3149 > URL: https://issues.apache.org/jira/browse/COUCHDB-3149 > Project: CouchDB > Issue Type: Bug >Reporter: Nick Vatamaniuc > > {code} > [info] 2016-09-14T20:08:23.217251Z node1@127.0.0.1 <0.23485.0> ea02496172 > ea02496172 127.0.0.1 localhost:15984 DELETE /d1 200 ok 46 > [error] 2016-09-14T20:08:23.221676Z node1@127.0.0.1 <0.22945.0> > rexi_server > error:{'EXIT',{{stop,{cb_state,<0.22937.0>,#Ref<0.0.1.15627>,true}},[{couch_event_listener_mfa,handle_event,3,[{file,"src/couch_event_listener_mfa.erl"},{line,91}]},{couch_event_listener,do_event,3,[{file,"src/couch_event_listener.erl"},{line,142}]},{rexi_server,init_p,3,[{file,"src/rexi_server.erl" > },{line,139}]}]}} > [{couch_event_listener,do_event,3,[{file,"src/couch_event_listener.erl"},{line,150}]},{rexi_server,init_p,3,[{file,"src/rexi_server.erl"},{line,139}]}] > [info] 2016-09-14T20:08:23.222174Z node1@127.0.0.1 <0.22898.0> 549ae68ef1 > 549ae68ef1 127.0.0.1 localhost:15984 GET /d1/_changes?feed=longpoll 200 ok > 32901 > {code} > Appears in the log if a database gets deleted while there is a change feed > running. Both longpoll or continuous seem to trigger the behavior. > Exception above in couch_event_listener_mfa:handle_event comes from > https://github.com/apache/couchdb-couch-event/blob/master/src/couch_event_listener_mfa.erl#L91 > which, in turn comes from fabric_db_update_listener handle_db_event returning > \{stop, St\} in: > https://github.com/apache/couchdb-fabric/blob/master/src/fabric_db_update_listener.erl#L87 > It seems couch_event_listerner_mfa:handle_event doesn’t handle \{stop, St\} > only, \{ok, NewState\} or just stop or it raises an exception. > I tried to replace \{stop, St\} with \{ok, St\} and then with stop. But in > both cases change feeds never stopped. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (COUCHDB-3149) Exception written to the log if db deleted while there is a change feed running
[ https://issues.apache.org/jira/browse/COUCHDB-3149?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15493655#comment-15493655 ] Nick Vatamaniuc commented on COUCHDB-3149: -- Here is an attempt at fixing it: https://github.com/apache/couchdb-fabric/pull/69 But not familiar with that code, so probably took the wrong approach. > Exception written to the log if db deleted while there is a change feed > running > --- > > Key: COUCHDB-3149 > URL: https://issues.apache.org/jira/browse/COUCHDB-3149 > Project: CouchDB > Issue Type: Bug >Reporter: Nick Vatamaniuc > > {code} > [info] 2016-09-14T20:08:23.217251Z node1@127.0.0.1 <0.23485.0> ea02496172 > ea02496172 127.0.0.1 localhost:15984 DELETE /d1 200 ok 46 > [error] 2016-09-14T20:08:23.221676Z node1@127.0.0.1 <0.22945.0> > rexi_server > error:{'EXIT',{{stop,{cb_state,<0.22937.0>,#Ref<0.0.1.15627>,true}},[{couch_event_listener_mfa,handle_event,3,[{file,"src/couch_event_listener_mfa.erl"},{line,91}]},{couch_event_listener,do_event,3,[{file,"src/couch_event_listener.erl"},{line,142}]},{rexi_server,init_p,3,[{file,"src/rexi_server.erl" > },{line,139}]}]}} > [{couch_event_listener,do_event,3,[{file,"src/couch_event_listener.erl"},{line,150}]},{rexi_server,init_p,3,[{file,"src/rexi_server.erl"},{line,139}]}] > [info] 2016-09-14T20:08:23.222174Z node1@127.0.0.1 <0.22898.0> 549ae68ef1 > 549ae68ef1 127.0.0.1 localhost:15984 GET /d1/_changes?feed=longpoll 200 ok > 32901 > {code} > Appears in the log if a database gets deleted while there is a change feed > running. Both longpoll or continuous seem to trigger the behavior. > Exception above in couch_event_listener_mfa:handle_event comes from > https://github.com/apache/couchdb-couch-event/blob/master/src/couch_event_listener_mfa.erl#L91 > which, in turn comes from fabric_db_update_listener handle_db_event returning > \{stop, St\} in: > https://github.com/apache/couchdb-fabric/blob/master/src/fabric_db_update_listener.erl#L87 > It seems couch_event_listerner_mfa:handle_event doesn’t handle \{stop, St\} > only, \{ok, NewState\} or just stop or it raises an exception. > I tried to replace \{stop, St\} with \{ok, St\} and then with stop. But in > both cases change feeds never stopped. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (COUCHDB-3149) Exception written to the log if db deleted while there is a change feed running
[ https://issues.apache.org/jira/browse/COUCHDB-3149?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15493638#comment-15493638 ] ASF subversion and git services commented on COUCHDB-3149: -- Commit b5340347294ac8047619df23b1586774d22e5b71 in couchdb-fabric's branch refs/heads/3149-delete-db-with-change-feed from [~vatamane] [ https://git-wip-us.apache.org/repos/asf?p=couchdb-fabric.git;h=b534034 ] Avoid throwing exception when deleting db in db updater listener Handle db deletion explicitly. Previously handle_db_event callback returned `{stop, St}`. That return value was not handled by the caller, instead it resulted in it being used as reason in an erlang:error, which then ended up in the log. Jira: COUCHDB-3149 > Exception written to the log if db deleted while there is a change feed > running > --- > > Key: COUCHDB-3149 > URL: https://issues.apache.org/jira/browse/COUCHDB-3149 > Project: CouchDB > Issue Type: Bug >Reporter: Nick Vatamaniuc > > {code} > [info] 2016-09-14T20:08:23.217251Z node1@127.0.0.1 <0.23485.0> ea02496172 > ea02496172 127.0.0.1 localhost:15984 DELETE /d1 200 ok 46 > [error] 2016-09-14T20:08:23.221676Z node1@127.0.0.1 <0.22945.0> > rexi_server > error:{'EXIT',{{stop,{cb_state,<0.22937.0>,#Ref<0.0.1.15627>,true}},[{couch_event_listener_mfa,handle_event,3,[{file,"src/couch_event_listener_mfa.erl"},{line,91}]},{couch_event_listener,do_event,3,[{file,"src/couch_event_listener.erl"},{line,142}]},{rexi_server,init_p,3,[{file,"src/rexi_server.erl" > },{line,139}]}]}} > [{couch_event_listener,do_event,3,[{file,"src/couch_event_listener.erl"},{line,150}]},{rexi_server,init_p,3,[{file,"src/rexi_server.erl"},{line,139}]}] > [info] 2016-09-14T20:08:23.222174Z node1@127.0.0.1 <0.22898.0> 549ae68ef1 > 549ae68ef1 127.0.0.1 localhost:15984 GET /d1/_changes?feed=longpoll 200 ok > 32901 > {code} > Appears in the log if a database gets deleted while there is a change feed > running. Both longpoll or continuous seem to trigger the behavior. > Exception above in couch_event_listener_mfa:handle_event comes from > https://github.com/apache/couchdb-couch-event/blob/master/src/couch_event_listener_mfa.erl#L91 > which, in turn comes from fabric_db_update_listener handle_db_event returning > \{stop, St\} in: > https://github.com/apache/couchdb-fabric/blob/master/src/fabric_db_update_listener.erl#L87 > It seems couch_event_listerner_mfa:handle_event doesn’t handle \{stop, St\} > only, \{ok, NewState\} or just stop or it raises an exception. > I tried to replace \{stop, St\} with \{ok, St\} and then with stop. But in > both cases change feeds never stopped. -- This message was sent by Atlassian JIRA (v6.3.4#6332)