You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Filipe Manana (JIRA)" <ji...@apache.org> on 2011/03/10 23:11:59 UTC

[jira] Created: (COUCHDB-1088) Validate replication documents added to the replicator database

Validate replication documents added to the replicator database
---------------------------------------------------------------

                 Key: COUCHDB-1088
                 URL: https://issues.apache.org/jira/browse/COUCHDB-1088
             Project: CouchDB
          Issue Type: Improvement
          Components: Replication
    Affects Versions: 1.1
            Reporter: Filipe Manana
            Assignee: Filipe Manana


Currently we don't validate the replication documents added to the replicator database - we don't check if mandatory fields (source and target) are present and if they have the right type (string or object). We also don't check if optional fields, like "continuous" or "create_target", have the right type - for example, often users specify the string "true" as the value for those 2 fields when it should be a boolean.

The following patch adds some basic validation to the _replicator database default document validation function. Besides throwing meaningful error messages to the user, it also adds nice information in the log like for e.g.:

[info] [<0.3938.0>] OS Process #Port<0.35369> Log :: Error writing document `rep1' to the replicator database: The `source' property must exist and be either a string or an object.
[info] [<0.3887.0>] 127.0.0.1 - - PUT /test_suite_rep_db/rep1 403
[info] [<0.3938.0>] OS Process #Port<0.35369> Log :: Error writing document `rep1' to the replicator database: The `continuous' field must be a boolean.
[info] [<0.3887.0>] 127.0.0.1 - - PUT /test_suite_rep_db/rep1 403
[info] [<0.3938.0>] OS Process #Port<0.35369> Log :: Error writing document `rep1' to the replicator database: The `filter' field must be a non-empty string.


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Resolved: (COUCHDB-1088) Validate replication documents added to the replicator database

Posted by "Filipe Manana (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-1088?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Filipe Manana resolved COUCHDB-1088.
------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.2
                   1.1

Applied to trunk and branch 1.1.x.

> Validate replication documents added to the replicator database
> ---------------------------------------------------------------
>
>                 Key: COUCHDB-1088
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1088
>             Project: CouchDB
>          Issue Type: Improvement
>          Components: Replication
>    Affects Versions: 1.1
>            Reporter: Filipe Manana
>            Assignee: Filipe Manana
>             Fix For: 1.1, 1.2
>
>         Attachments: COUCHDB-1088.patch
>
>
> Currently we don't validate the replication documents added to the replicator database - we don't check if mandatory fields (source and target) are present and if they have the right type (string or object). We also don't check if optional fields, like "continuous" or "create_target", have the right type - for example, often users specify the string "true" as the value for those 2 fields when it should be a boolean.
> The following patch adds some basic validation to the _replicator database default document validation function. Besides throwing meaningful error messages to the user, it also adds nice information in the log like for e.g.:
> [info] [<0.3938.0>] OS Process #Port<0.35369> Log :: Error writing document `rep1' to the replicator database: The `source' property must exist and be either a string or an object.
> [info] [<0.3887.0>] 127.0.0.1 - - PUT /test_suite_rep_db/rep1 403
> [info] [<0.3938.0>] OS Process #Port<0.35369> Log :: Error writing document `rep1' to the replicator database: The `continuous' field must be a boolean.
> [info] [<0.3887.0>] 127.0.0.1 - - PUT /test_suite_rep_db/rep1 403
> [info] [<0.3938.0>] OS Process #Port<0.35369> Log :: Error writing document `rep1' to the replicator database: The `filter' field must be a non-empty string.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (COUCHDB-1088) Validate replication documents added to the replicator database

Posted by "Filipe Manana (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-1088?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Filipe Manana updated COUCHDB-1088:
-----------------------------------

    Attachment: COUCHDB-1088.patch

> Validate replication documents added to the replicator database
> ---------------------------------------------------------------
>
>                 Key: COUCHDB-1088
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1088
>             Project: CouchDB
>          Issue Type: Improvement
>          Components: Replication
>    Affects Versions: 1.1
>            Reporter: Filipe Manana
>            Assignee: Filipe Manana
>         Attachments: COUCHDB-1088.patch
>
>
> Currently we don't validate the replication documents added to the replicator database - we don't check if mandatory fields (source and target) are present and if they have the right type (string or object). We also don't check if optional fields, like "continuous" or "create_target", have the right type - for example, often users specify the string "true" as the value for those 2 fields when it should be a boolean.
> The following patch adds some basic validation to the _replicator database default document validation function. Besides throwing meaningful error messages to the user, it also adds nice information in the log like for e.g.:
> [info] [<0.3938.0>] OS Process #Port<0.35369> Log :: Error writing document `rep1' to the replicator database: The `source' property must exist and be either a string or an object.
> [info] [<0.3887.0>] 127.0.0.1 - - PUT /test_suite_rep_db/rep1 403
> [info] [<0.3938.0>] OS Process #Port<0.35369> Log :: Error writing document `rep1' to the replicator database: The `continuous' field must be a boolean.
> [info] [<0.3887.0>] 127.0.0.1 - - PUT /test_suite_rep_db/rep1 403
> [info] [<0.3938.0>] OS Process #Port<0.35369> Log :: Error writing document `rep1' to the replicator database: The `filter' field must be a non-empty string.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira