couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vassilis Radis <>
Subject Why couchDB does full replication instead of filtered?
Date Fri, 20 Jul 2012 23:53:42 GMT
I am having this problem with couchdb (1.2.0) replication: I am using the
replicator db with this setup document:

       "_id": "source_to_target",
       "_rev": "1-2a6510e28c2cc7caf0d58a85d705d2b8",
       "source": "http://xxxx:xxxx@localhost:5984/sourcedb",
       "target": "targetdb",
       "create_target": true,
       "continuous": true,
       "filter": "sourcedb/repl_filter",
       "query_params": {
           "someproperty": "somevalue"
       "user_ctx": {
           "name": "someadmin",
           "roles": [

The problem is that the filter function gets ignored. I am sure it is
correct because if I invoke:

    curl -X GET "

the results are correctly filtered.

I perform the test as follows:

I erase the target db completely. Then I erase the above replication and
recreate it from scratch.
As soon as the replication document shown above gets commited, the
replication starts and instead of the filtered docs, the target db gets ALL
the docs instead of the filtered, . The logs give a hint as to why:

    [Fri, 20 Jul 2012 17:43:38 GMT] [info] [<0.5860.17>] Replication
records differ. Scanning histories to find a common ancestor.
    [Fri, 20 Jul 2012 17:43:38 GMT] [info] [<0.5860.17>] no common ancestry
-- performing full replication

, which makes me scratch my head,because since I completely erase the
target db before starting the replication, why search for common ancsestors
with a not existent db? Apparently I am missing something, but I cant
figure it out. Any suggestions? Is this desired behaviour?

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