[ https://issues.apache.org/jira/browse/COUCHDB-1289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13155246#comment-13155246 ]
Filipe Manana commented on COUCHDB-1289: ---------------------------------------- Bob looks good. Just have a few comments: 1) The indentation is a bit messed up, like the "if" expression "true" clause and its inner "cause" expression: https://github.com/bdionne/couchdb/compare/master...1289-heartbeats-skipped2#L0R398 2) This issue doesn't happen exclusively once the code finishes folding the seq tree and starts listening for db update events. Lets say we have a heartbeat timeout of 10 seconds, a seq tree with millions of entries, a filter functions which returns false for many consecutive entries. It's quite possible that before folding the entire seq tree snapshot and sending the first changes row which passes the filter (if any) the heartbeat timeout is exceeded. Makes sense? 3) The test can have way less duplicated code (spawn_consumer_heartbeat is basically a copy-paste of spawn_consumer). I made a few changes to it in my repo: https://github.com/fdmanana/couchdb/commit/2af5d56b909449569d60573f8118d7187e9334ca thanks for working on this one > heartbeats skipped when continuous changes feed filter function produces no > results > ----------------------------------------------------------------------------------- > > Key: COUCHDB-1289 > URL: https://issues.apache.org/jira/browse/COUCHDB-1289 > Project: CouchDB > Issue Type: Bug > Components: Database Core > Reporter: Bob Dionne > Assignee: Bob Dionne > Priority: Minor > Attachments: > 0001-Ensure-heartbeats-are-not-skipped-in-continuous-chan.patch > > > if the changes feed has a filter function that produces no results, > db_updated messages will still be sent and the heartbeat timeout will never > be reached. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira