You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Chris Anderson (JIRA)" <ji...@apache.org> on 2009/03/06 23:47:56 UTC

[jira] Commented: (COUCHDB-218) View file is deleted at start of view rebuild

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

Chris Anderson commented on COUCHDB-218:
----------------------------------------

Just had an IRC conversation about this today. Putting it here (mostly for my reference).

The fix will be slightly less automatic than you mention (so we can stay transactional) but I think it will answer the use case. See transcript for details.

basically, if we name view indexes after the view signature, then you can generate them on a non-queried ddoc, and then push those same new views to the active ddoc when the index is built, and it would just start using it. should be not hard to implement.

the pattern (not implemented, requires a couch patch, is to deploy to a "staging" ddoc
[2:38pm] <jchris>
basically a ddoc that isn't used by client queries
[2:38pm] <jchris>
build the index
[2:39pm] <jchris>
and then push the new code to the production ddoc
[2:39pm] <jchris>
(with a small couch change I think we can make it flip to the new index transactionally)
[2:39pm] <jchris>
no downtime
[2:39pm] <jchris>
I'll write a jira ticket
[2:40pm] <mattetti>
that would be great, rebuilding views can be pretty slow when you have a big db
[2:40pm] <jchris>
targetting 0.10.0
[2:40pm] <mattetti>
let's get 0.9.0 out first :p
[2:40pm] <jchris>
in the mean time, version your ddoc names or something
[2:40pm] <jchris>
if you can't have downtime
[2:41pm] <mattetti>
I can have downtime right now, but I will really need conditional replication soon tho :( is that for 0.9 or 1.0? (or 0.10)
[2:41pm] <jchris>
won't make 0.9.0
[2:41pm] <jchris>
should be an easy change

> View file is deleted at start of view rebuild
> ---------------------------------------------
>
>                 Key: COUCHDB-218
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-218
>             Project: CouchDB
>          Issue Type: Bug
>          Components: JavaScript View Server
>            Reporter: Robert Newson
>
> When a view is altered the .view file is deleted and then recreated. Any query (with update=false) in the interim gets no results even though the results from the old view would have been adequate.
> Consider switching the replacement view file in after it's been rebuilt like db compaction does.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.