You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2020/09/09 15:15:19 UTC

[GitHub] [couchdb] nickva commented on pull request #3135: Update all the type monitors after setting any couch jobs type timeout

nickva commented on pull request #3135:
URL: https://github.com/apache/couchdb/pull/3135#issuecomment-689629809


   There is a notification monitor running for each type so that it watches for activity of those jobs and responds to subscriptions. To discover the types of jobs there is a periodic polling of all the types. The notifiers can also be auto-started the first time a subscription for that type comes in. Each type notifiers then starts watching for activity on that type starting with the version that it reads from the init call https://github.com/apache/couchdb/blob/prototype/fdb-layer/src/couch_jobs/src/couch_jobs_notifier.erl#L81
   
   What could happen (in a test mostly), a job subscribes while it is in the pending state still, then quickly finishes. By the time the type notifier is auto-started for that type, there won't be any more updates for that type since the test might have run just one job of that type and then was waiting to finish. So instead of adding more complexity to the notification mechanism, we ensure the notifiers are started when the type timeouts are set.
   


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

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