incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mage <m...@mage.hu>
Subject triggering all (necessary) view update
Date Fri, 29 Apr 2011 18:34:44 GMT
            Hello,

there should be a way to trigger an update on all views in a database.

I imagine a master-slave setup for a website. There can be one or
several slaves.

The code for the website gets updated. So do the views. (For example,
couchrest_model updates the view functions on every little code change).

Putting the new design documents to the master causes a big read-delay
on all the slaves while they are rebuilding the b-trees from scratch.

I would put the new design documents to a slave, let it rebuild the
views (the ones which were changed) then replicate the design document
changes to the master. This way the clients can read the other slaves or
the master while the updated slave rebuilds. After that the updated
slave can serve the clients while the others are rebuilding b-tress. No
delay.

I suppose that I can write a short script that finds all the views in a
database and asks one document from each, however it is not as elegant
as having a request which does the same.

        Mage

Mime
View raw message