CouchDB
  1. CouchDB
  2. COUCHDB-1199

Doc in _replicator db missing when using filter property

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.1
    • Fix Version/s: 1.1.1, 1.2
    • Component/s: Replication
    • Labels:
      None
    • Environment:

      Ubuntu 10.10

      Description

      Scenario1 below works as expected, Scenario2 fails.

      Scenario1
      curl -X POST 'http://127.0.0.1:5984/_replicator/' -H "Content-Type: application/json" -d {\"_id\":\"test1_to_test2\"\,\"source\":\"my_culture\"\,\"target\":\"http:\/\/127.0.0.1:5984\/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 'http://127.0.0.1:5984/_replicator/' -H "Content-Type: application/json" -d

      {\"_id\":\"test1_to_test2\"\,\"source\":\"my_culture\"\,\"target\":\"http:\/\/127.0.0.1:5984\/test2\"\,\"create_target\":\true\,\"filter\":\"http:\/\/127.0.0.1:5984\/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.

        Activity

        Filipe Manana made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 1.1.1 [ 12316395 ]
        Fix Version/s 1.2 [ 12315198 ]
        Resolution Fixed [ 1 ]
        Filipe Manana made changes -
        Attachment couchdb-1199-11x.patch [ 12483210 ]
        Filipe Manana made changes -
        Assignee Filipe Manana [ fdmanana ]
        andrew henderson made changes -
        Field Original Value New Value
        Description Scenario1 below works as expected, Scenario2 fails.

        Scenario1
        curl -X POST 'http://127.0.0.1:5984/_replicator/' -H "Content-Type: application/json" -d {\"_id\":\"test1_to_test2\"\,\"source\":\"my_culture\"\,\"target\":\"http:\/\/127.0.0.1:5984\/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 'http://127.0.0.1:5984/_replicator/' -H "Content-Type: application/json" -d {\"_id\":\"test1_to_test2\"\,\"source\":\"my_culture\"\,\"target\":\"http:\/\/127.0.0.1:5984\/test2\"\,\"create_target\":\true\,\"filter\":\"http:\/\/127.0.0.1:5984\/test2\/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.
        Scenario1 below works as expected, Scenario2 fails.

        Scenario1
        curl -X POST 'http://127.0.0.1:5984/_replicator/' -H "Content-Type: application/json" -d {\"_id\":\"test1_to_test2\"\,\"source\":\"my_culture\"\,\"target\":\"http:\/\/127.0.0.1:5984\/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 'http://127.0.0.1:5984/_replicator/' -H "Content-Type: application/json" -d {\"_id\":\"test1_to_test2\"\,\"source\":\"my_culture\"\,\"target\":\"http:\/\/127.0.0.1:5984\/test2\"\,\"create_target\":\true\,\"filter\":\"http:\/\/127.0.0.1:5984\/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.
        andrew henderson created issue -

          People

          • Assignee:
            Filipe Manana
            Reporter:
            andrew henderson
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development