incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ladislav Thon <ladi...@gmail.com>
Subject Re: Updating documents for a change in application model
Date Sun, 22 May 2011 08:12:52 GMT
Hi,

wrote quite a portion of text, then realized it's all about what you already
described, so deleted it. Only one thought:

2. Use _all_docs to iterate over all documents, detect the ones that need
> changes and do them. This can probably take a while if you have lots of
> documents and never trigger all_docs during the "normal" application
> lifetime.
>

A variation of this might be to create a view that will be keyed by version
(and type, another "necessary" field in every document) and use that for
migrations, not _all_docs. You can be pretty sure that keys of this view
won't change.

In large databases (which I have no experience with), you probably can't
afford running migrations off-line, so you have to deal with older versions
of documents at runtime. Some sort of your approach 1 will probably be
needed. Same applies when using replication.

LT

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message