couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Damien Katz <>
Subject Re: couchdb transactions changes
Date Mon, 09 Feb 2009 02:37:14 GMT

On Feb 8, 2009, at 9:24 PM, Chris Anderson wrote:

> On Sun, Feb 8, 2009 at 5:54 PM, Damien Katz <> wrote:
>> It's possible to use MVCC for replication. You'll need to create  
>> special
>> HTTP command to return you all the documents you are interested in  
>> a single
>> request, and a special replicator that uses that command and loads  
>> those
>> documents and writes them to the destination.
> This sound a lot like the notification view Damien's been talking
> about, where clients can register to be told about database updates
> that match particular functions.
> The main problem I see with MVCC replication is that if it dies in the
> middle, you might not be able to restart it right where you left off.

That would be a big problem of replicating huge databases. Everything  
must come over in one transaction.

If you want consistency on the target, you'll have to write lock the  
database (not a concept couchdb really has) until the whole  
replication completes, or write all the docs in one big bulk  
transaction, which won't work for large databases. And while that  
transaction is occurring, neither the source database or target  
database file itself be compacted (the compaction will take place, but  
the old file can't be freed until the full transaction completes).


> -- 
> Chris Anderson

View raw message