couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "andrew henderson (JIRA)" <>
Subject [jira] [Commented] (COUCHDB-1199) Doc in _replicator db missing when using filter property
Date Sun, 19 Jun 2011 23:19:47 GMT


andrew henderson commented on COUCHDB-1199:

Filipe, thank you for the helpful suggestions.
It gets worse before getting better. Upon following your advice regarding -d '{...}' and inserting
the same doc with INCORRECT syntax for filter as in scenario2 above, the couchdb server now
crashes immediately. I have about two seconds after restarting the server to delete the doc
before it crashes again.
 curl -X POST '' -H "Content-Type: application/json" -d
 -- CouchDB Crashes. Restart -- 
curl -X GET {"total_rows":2,"offset":0,"rows":[
 -- CouchDB Crashes again -- 

The good news is that using correct syntax to insert a _replicator with filter is safe and
does replicate as expected. 
curl -X POST '' -H "Content-Type: application/json" -d '{"_id":"test1_to_test2","source":"my_culture","target":"","create_target":true,"filter":"profile/app_ddocs"}'
{"ok":true,"id":"test1_to_test2","rev":"1-ebee8391fe78cb4155f7f134d76af77e"} admin >
 curl -X GET{"total_rows":2,"offset":0,"rows":[
I would suggest downgrading the criticality of this bug, but fixing it anyway since it can
be very problematic to mistakenly insert a _replicator filter doc using incorrect syntax.

- Andrew

> Doc in _replicator db missing when using filter property
> --------------------------------------------------------
>                 Key: COUCHDB-1199
>                 URL:
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Replication
>    Affects Versions: 1.1
>         Environment: Ubuntu 10.10
>            Reporter: andrew henderson
> Scenario1 below works as expected, Scenario2 fails.
> Scenario1
> curl -X POST '' -H "Content-Type: application/json"
-d {\"_id\":\"test1_to_test2\"\,\"source\":\"my_culture\"\,\"target\":\"http:\/\/\/test2\"\,\"create_target\":\true\}{"ok":true,"id":"test1_to_test2","rev":"1-df297eda4880633bc0442590724014ff"}
> Doc is created in _replicator
> Replication completes successfully
> Scenario2
> curl -X POST '' -H "Content-Type: application/json"
-d {\"_id\":\"test1_to_test2\"\,\"source\":\"my_culture\"\,\"target\":\"http:\/\/\/test2\"\,\"create_target\":\true\,\"filter\":\"http:\/\/\/my_culture\/profile\/app_ddocs\"}
> {"ok":true,"id":"test1_to_test2","rev":"1-97641b372d500d842688d217f97081da"}
> Doc is not created in _replicator (in spite of 'ok' response above)
> No replication occurs.
> Now, I am not sure whether I got the right syntax in the filter property since I could
find no documentation for it. In particular, whether the filter should be in the source db
or _replicator. And do we use a full URL as above or just ddoc/filter name? The filter documented
in Scenario2 does exist in source db.
> In any case, the doc in _replicator ought not to be getting lost as does happen.

This message is automatically generated by JIRA.
For more information on JIRA, see:


View raw message