[ 
https://issues.apache.org/jira/browse/COUCHDB-2037?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13882160#comment-13882160
 ] 

Jason Smith commented on COUCHDB-2037:
--------------------------------------

I wrote up some operational advice about this issue 
http://mail-archives.apache.org/mod_mbox/couchdb-user/201308.mbox/%3ccacly94uq9eafd_q-lxv8b3acipnhgmnawdn2c1ljnvumq-c...@mail.gmail.com%3E

Surely you know this already but the unspoken general point is that human 
activity should *never* be able to modify production design documents. If that 
includes replication or replication-like activity, then you should be 
replicating _design/foo-staging docs and then manually upgrading them after a 
human confirms stuff. Bleh. This is just stupid platitudes.

> view unavailability on production design docs
> ---------------------------------------------
>
>                 Key: COUCHDB-2037
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-2037
>             Project: CouchDB
>          Issue Type: New Feature
>          Components: JavaScript View Server
>            Reporter: Isaac Z. Schlueter
>
> It can take a very long time to generate views for a large database.  If you 
> have an application that relies on those views, even if performance is 
> acceptable, it is generally a serious problem if something causes the views 
> for that design doc to no longer be available.  This gets especially tricky 
> if a new view is added or modified, as then all view data is thrown away and 
> regenerated, causing your website or app to be unavailable for hours at a 
> time.
> To work around this problem, I've taken to the following work flow:
> 1. PUT the new design doc to /db/_design/scratch
> 2. Load a view from /db/_design/scratch
> 3. Once view generation on _design/scratch finishes, send an http COPY 
> request to move the _design/scratch to _design/app.
> This mostly works pretty well.  However, if you have jobs that copy couchdb 
> documents from one place to another, it can be very easy to accidentally 
> trigger a view regeneration and cause your website or app to go down.  (Qv 
> today's npmjs.org outage.)
> I would love it if there was a way to say, "NEVER make the views of 
> _design/app unavailable, even if they are temporarily out of date".  I can 
> imagine a few ways that this could be accomplished:
> 1. PUTs to the specified design doc fail if they modify the "views" member.
> 2. COPYs to the specified design doc fail if the COPY source does not have a 
> full set of pre-generated views.
> 3. Views for the specified design doc are always done in the background, and 
> stale=ok is assumed for all requests.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to