nickva opened a new pull request #2637: wip 4
URL: https://github.com/apache/couchdb/pull/2637
 
 
   Notes:
    
    * Instead of a separate ken2 / ken app use couch_views app
   
    * Main logic happens in `couch_view_updater` module
   
    * Introduce an index registration system to other indexing apps can 
register themselves using the `couch_views_indices`
   
    * Re-use the `after_doc_write` EPI callback from the Mango PR to let 
`couch_views` application receive updates and send them to 
`couch_views_updater:db_updated/1` function
   
    * `couch_views_updater:db_updated/1` should have minimal impact on the CRUD 
hot path. Each calls performs an single `ets:insert_new` call into sharded ETS 
table and immediately returns.
   
     * Each sharded ets table has it's separate process which bump all the 
registered indices after some configured amount of time.
   
    * How long a db will accumulate updates before it triggers a rebuild is 
configured via `updater_delay_msec` settings.
   
    * The resolution (how often each updater process checks) is configured via 
`updater_resolution_msec` setting. There is a 25% jitter applied here as well.
   
    * Multiple nodes would be bumping the same indexing job since CRUD requests 
are spread uniformly amongst the nodes. To avoid un-necessarily churning 
through couch_jobs' pending queue, noticed an optimization to avoid writes if 
the scheduled time during resubmit is not changed. So the first node which gets 
bump the job will put the job in the pending state, others will do a read, 
single KV read see that it's already pending and then not issue any writes.
   
   
   

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to