nickva opened a new pull request, #5683:
URL: https://github.com/apache/couchdb/pull/5683

   `run_on_first_node` feature is a running mode for plugins which are only 
interested in design documents, and may want to avoid fetching clustered design 
docs on all nodes.
   
   However that feature didn't work since it clashed with a premature 
optimization in plugin's `scan_db/2` function, which avoided scanning the db if 
no shards were scheduled to be scanned on the first node. For example, with a 3 
node cluster and a q=2 db, it was possible to have both of its shards scheduled 
to be scanned on db2 and db3, respectively, while the plugin was running on db1 
only. In that case the plugin would have skipped calling the main part of 
`scan_db` which does ddoc processing.
   
   The fix is to remove the premature optimization and load the ddoc even if no 
shards are scheduled to be scanned on that node since we may be dealing with a 
plugin which is only interested in design documents.
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to