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

Filipe Manana commented on COUCHDB-1289:
----------------------------------------

Bob, for the indentation we have those rules in the wiki:  
http://wiki.apache.org/couchdb/Coding_Standards.
For e.g. the "true" at:  
https://github.com/bdionne/couchdb/compare/master...1289-heartbeats-skipped2#L0R401
Is not aligned with corresponding "if" (line 398) neither it is on a column 
multiple of 4 spaces.

Yep, for 2) it's an extra scenario. Probably after passing a row to the filter 
function, if the filter returns "false" and the time difference between "now()" 
and the time the last row was sent is greater than the threshold, it would call 
the callback with "timeout" (so it sends the newline to http clients). If the 
filter returns "true", set that "last row sent time" to "now()". The only case 
where this wouldn't work is if the filter function takes "heartbeat" seconds to 
evaluate a changes row (possibly very unlikely).
This can probably be addressed separately, I have no objection about that.
                
> 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

        

Reply via email to