rnewson commented on PR #4729:
URL: https://github.com/apache/couchdb/pull/4729#issuecomment-1688623250

   updated again. I've expanded fabric_streams existing 'cleanup' process to be 
a watchdog (in the classic sense).
   
   before starting a fabric_stream you must call 
`fabric_stream:enable_watchdog().` If you do, the cleanup process starts a 
timer. If the watchdog is not kicked at least once (with 
`fabric_stream:kick_watchdog().`) before the timer fires, the watchdog kills 
the coordinator process (for us, the mochiweb/httpd process). this in turn 
causes the watchdog to get a `DOWN` message as it was monitoring the 
coordinator, and it then cleans up the workers.
   
   by default this is not active, so all calls to fabric:all_docs etc are 
unaffected.
   
   in mango_httpd I enable the watchdog and only when adding a row to the 
response do I kick the watchdog. If we go a long time between rows, the 
watchdog fires.
   
   similar enable/kick can be done on other endpoints.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to