couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Smith <>
Subject Re: The replicator needs a superuser mode
Date Wed, 17 Aug 2011 03:37:46 GMT
tl;dr response here, philosophical musings below.

1. The requirements are real, it's reasonable to want to copy from A to B
2. Replication is a whole worldview, adding ?force=true breaks that worldview
3. Dump and restore sounds more appropriate

On Wed, Aug 17, 2011 at 9:34 AM, Adam Kocoloski <> wrote:
>> But to "guarantee all my documents are stored in this other database"
>> is actually incoherent. It is IMHO anti-CouchDB.
> Hi Jason, we're going to have to disagree on this one.  Replication is really flexible
and can do lots of things that database replication has not historically been able to do,
but I think it's a sad state of affairs that it's not possible to use replication to create
a replica of an arbitrary database.

True. I agree with the requirements, but the solution raises a red flag.

My understanding of couch:

There is no such thing as a database (or data set) clone. There is no
such thing as a database copy. There is no such thing as two databases
with the same document. It's like Pauli's exclusion principle. Sure,
maybe the doc and rev history are the same, but the _security object,
the authentication environment, and the URI are different. That
(generally) affects how applications and validation works.

Put another way, this idea is a leaky abstraction. I much prefer Jan's
_dump and _restore idea. It has some difficulties, but it is *not*
replication. It's something totally different. In the universe of a
database, replication always follows the rules. In the universe of a
Couch, sure, sometimes you need to clone data around. There's an
appropriate action for each abstraction layer.

The nice thing about _dump and _restore, and also rsync, is that you
make full, opaque clones (not replicas!). You can't merge or splice
data sets. Once you are talking about merging data, or pulling out a
subset, now you are in database land, not couch land, and you have to
follow the rules of replication.

Iris Couch

View raw message